On 07/25/12 12:31, Steve Kargl wrote:
On Wed, Jul 25, 2012 at 12:27:43PM -0500, Stephen Montgomery-Smith wrote:
On 07/25/12 11:29, Rainer Hurling wrote:

Many thanks to you three for implementing expl() with r238722 and r238724.

I am not a C programmer, but would like to ask if the following example
is correct and suituable as a minimalistic test of this new C99 function?



(program deleted)


Compiled with 'c99 -o math_expl math_expl.c -lm' and running afterwards
it gives me:

exp(2.000000)  is
7.3890560989306504069

expl(2.000000) is
7.38905609893065022739794


Just as a point of comparison, here is the answer computed using
Mathematica:

N[Exp[2], 50]
7.3890560989306502272304274605750078131803155705518

As you can see, the expl solution has only a few digits more accuracy
that exp.

Unless you are using sparc64 hardware.

flame:kargl[204] ./testl -V 2
ULP = 0.2670 for x = 2.000000000000000000000000000000000e+00
mpfr exp: 7.389056098930650227230427460575008e+00
libm exp: 7.389056098930650227230427460575008e+00


Yes.  It would be nice if long on the Intel was as long as the sparc64.


_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to