[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: Re: better atan function?*From*: "Liam E.Gumley" <Liam.Gumley(at)ssec.wisc.edu>*Date*: Thu, 01 Jun 2000 13:09:27 -0500*Newsgroups*: comp.lang.idl-pvwave*Organization*: Space Science and Engineering Center, UW-Madison*References*: <a8XY4.3641$Rx.423021@den-news1.rmi.net> <3935EEC5.135226B2@phys.ucalgary.ca>*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:19841

bjackel@phys.ucalgary.ca wrote: > > Hi Bob > > Hmm. A couple minutes playing with atan gives the following: > > IDL> help,atan(1.0d-12,1.0d0) > <Expression> DOUBLE = 1.0000000e-012 > > IDL> help,atan(1.0d-15,1.0d0) > <Expression> DOUBLE = 1.0000000e-015 > > IDL> help,!dpi/2.0d0 - atan(1.0d0,1.0d-12) > <Expression> DOUBLE = 9.9986686e-013 > > IDL> help,!dpi/2.0d0 - atan(1.0d0,1.0d-15) > <Expression> DOUBLE = 8.8817842e-016 > > So the small angle stuff is essentially perfect. The error > at large angles is almost certainly due to subtracting two > nearly equal quantities. This of course doesn't rule out > something funny for moderate angles, but it'd be surprising. Some interesting observations on computing elementary functions are available at http://math.nist.gov/javanumerics/reports/jgfnwg-02.html#Appendix-3 Cheers, Liam. http://cimss.ssec.wisc.edu/~gumley

**References**:**better atan function?***From:*R

**Re: better atan function?***From:*bjackel

- Prev by Date:
**reading a Mac text file on Windows** - Next by Date:
**Curvefit on PV-Wave** - Prev by thread:
**Re: better atan function?** - Next by thread:
**Re: better atan function? (sheepishly " ... nevermind ...")** - Index(es):