From: Jason Dick Date: Tue, 15 Nov 2011 10:49:00 +0000 (+0000) Subject: re PR libstdc++/51133 (Incorrect implementation of std::tr1::hermite()) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=402356d1466804239212e0fec68d3753114d0cfe;p=gcc.git re PR libstdc++/51133 (Incorrect implementation of std::tr1::hermite()) 2011-11-15 Jason Dick PR libstdc++/51133 * include/tr1/poly_hermite.tcc (__poly_hermite_recursion): Fix wrong sign in recursion relation. From-SVN: r181381 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5eb3f8d4376..e4a09a5e587 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2011-11-15 Jason Dick + + PR libstdc++/51133 + * include/tr1/poly_hermite.tcc (__poly_hermite_recursion): Fix + wrong sign in recursion relation. + 2011-11-14 Paolo Carlini * include/c_global/cmath (frexp, modf, remquo): Do not mark constexpr, diff --git a/libstdc++-v3/include/tr1/poly_hermite.tcc b/libstdc++-v3/include/tr1/poly_hermite.tcc index e86b3777c74..95e8079d543 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; }