386 Maths Library - (another) bug fix
Glenn Geers
glenn at suphys.physics.su.OZ.AU
Wed Nov 21 07:16:21 AEST 1990
I've been told by various people to think what the GNU Licence really means.
This bug fix is marked copyright to me. This may be permanent or I may rescind.
Ftp access is now available for beta1 only. I'm up to beta3. Beta2 was available
for ftp yesterday. I've now prevented access.
And now for the bug fix....
This is only needed if you've got beta1 or beta2.
*******************************************************************************
*******************************************************************************
Priority: Urgent
Symptoms: atan2 crashes when its second argument is zero and its first argument
is not zero.
Fix:
Replace the previous version with the one below
---------------------------CUT HERE-------------------------------------------
/*
** (C) 1990 G. Geers
*/
#define HALFPI 1.57079632679489661923
#define MHALFPI -1.57079632679489661923
double
atan2(y, x)
double x, y;
{
if (x == 0.0)
if (y > 0.0)
return (HALFPI);
else if (y <0.0 )
return (MHALFPI);
else if (y == 0.0 )
return(0.0);
asm("fldl 8(%ebp)");
asm("fdivl 16(%ebp)");
asm("fld1");
asm("fpatan");
}
---------------------------CUT HERE-------------------------------------------
Cheers,
Glenn
--
Glenn Geers | "So when it's over, we're back to people.
Department of Theoretical Physics | Just to prove that human touch can have
The University of Sydney | no equal."
Sydney NSW 2006 Australia | - Basia Trzetrzelewska, 'Prime Time TV'
More information about the Comp.unix.sysv386
mailing list