Re: Another chapter in the NeXT Tanh bug saga!
- To: mathgroup at yoda.ncsa.uiuc.edu
- Subject: Re: Another chapter in the NeXT Tanh bug saga!
- From: jel at corp.portal.com (John Little)
- Date: Mon, 4 Mar 91 13:48:41 PST
The function tanh() returns a double. Unless you explicitly declare this to be the case, the result that you get will not be useful, since the compiler has no way of telling the type of the returned value. Math.h says (among other things): extern double tanh(/* double x */); John >Well! I've found another interesting piece of the Tanh puzzle! > >Stephen Wolfram made a posting implying that the Tanh bug >was NeXT's fault: > >> printf("%g %g\n", tanh(-1.73287), tanh(-1.73288)); >> >> in a minimal C program on a NeXT under OS version 2.0 shows a >> discontinuity. >> >> Mathematica (apparently mistakenly) relies on built-in math functions. >> >> Stephen Wolfram <swolf at dragonfly.wri.com> > >As you will see, that word "minimal" is STRICTLY true.