diff options
author | Jason Dick <dickphd@gmail.com> | 2011-11-15 10:49:00 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2011-11-15 10:49:00 +0000 |
commit | 402356d1466804239212e0fec68d3753114d0cfe (patch) | |
tree | f438959cfac61218230fef4b8a7fdfc88f3a5d95 /libstdc++-v3/include/tr1 | |
parent | 0ea069123cedf42fe171371a809b8d33adf411b9 (diff) | |
download | gcc-402356d1466804239212e0fec68d3753114d0cfe.zip gcc-402356d1466804239212e0fec68d3753114d0cfe.tar.gz gcc-402356d1466804239212e0fec68d3753114d0cfe.tar.bz2 |
re PR libstdc++/51133 (Incorrect implementation of std::tr1::hermite())
2011-11-15 Jason Dick <dickphd@gmail.com>
PR libstdc++/51133
* include/tr1/poly_hermite.tcc (__poly_hermite_recursion): Fix
wrong sign in recursion relation.
From-SVN: r181381
Diffstat (limited to 'libstdc++-v3/include/tr1')
-rw-r--r-- | libstdc++-v3/include/tr1/poly_hermite.tcc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/tr1/poly_hermite.tcc b/libstdc++-v3/include/tr1/poly_hermite.tcc index e86b377..95e8079 100644 --- a/libstdc++-v3/include/tr1/poly_hermite.tcc +++ b/libstdc++-v3/include/tr1/poly_hermite.tcc @@ -1,6 +1,6 @@ // Special functions -*- C++ -*- -// Copyright (C) 2006, 2007, 2008, 2009, 2010 +// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -84,7 +84,7 @@ namespace tr1 unsigned int __i; for (__H_nm2 = __H_0, __H_nm1 = __H_1, __i = 2; __i <= __n; ++__i) { - __H_n = 2 * (__x * __H_nm1 + (__i - 1) * __H_nm2); + __H_n = 2 * (__x * __H_nm1 - (__i - 1) * __H_nm2); __H_nm2 = __H_nm1; __H_nm1 = __H_n; } |