Patchwork [v3] libstdc++/51133

login
register
mail settings
Submitter Paolo Carlini
Date Nov. 15, 2011, 10:50 a.m.
Message ID <4EC243FF.2070008@oracle.com>
Download mbox | patch
Permalink /patch/125743/
State New
Headers show

Comments

Paolo Carlini - Nov. 15, 2011, 10:50 a.m.
Hi,

tested x86_64-linux multilib, committed mainline and 4_6-branch.

Thanks,
Paolo.

///////////////////
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.

Patch

Index: include/tr1/poly_hermite.tcc
===================================================================
--- include/tr1/poly_hermite.tcc	(revision 181359)
+++ include/tr1/poly_hermite.tcc	(working copy)
@@ -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 @@ 
       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;
         }