Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!metro!news From: glenn@suphys.physics.su.OZ.AU (Glenn Geers) Newsgroups: comp.unix.sysv386 Subject: 386 Maths Library - (another) bug fix Message-ID: <1990Nov20.201621.17199@metro.ucc.su.OZ.AU> Date: 20 Nov 90 20:16:21 GMT Reply-To: glenn@suphys.physics.su.OZ.AU (Glenn Geers) Organization: School of Physics, Uni of Sydney, Australia. Lines: 55 Nntp-Posting-Host: suphys.physics.su.oz.au 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'