Error in hypgeo


Saul Teukolsky
07-21-2013, 03:19 PM
Line 13 of the function hypgeo should be changed from
else z0=Complex(0.0,imag(z) >= 0.0 ? 0.5 : -0.5);
to
else z0=Complex(0.0,imag(z) > 0.0 ? 0.5 : -0.5);

This bug only affects values of the function for real z bigger than 1. (See the discussion in http://www.nr.com/forum/showthread.php?t=2265)

Strictly speaking, this is not a bug but a change to conform to the most prevalent convention for defining the function for z>1.