This is the mail archive of the
mailing list for the Java project.
Re: libjava configure question
Bryce McKinlay writes:
> Andrew Haley wrote:
> > > Hmm, thats quite surprising. Are you sure this was using the real math
> > > library functions and not substituting FPU instructions? Do you have
> > > some test case that checks for conformance?
> >The first result comes from the standard library, the second from GMP,
> >calculated to high precision. The Java spec says that the answer must
> >be right +/- 1 ulp.
> > $ gcc trial.c -lmpfr -lgmp -lm
> > $ ./a.out
> Ah, bummer. It works on x86_64, though:
> $ gcc sintest.c -O2 -lm -lgmp -lmpfr
> $ ./a.out
> And we could still inline other math functions, besides the trig ones...?
Sure. Some functions are fairly hard to get wrong: log() and exp()
fall into this category. Others, such as pow() and the trig
functions, are surprisingly difficult. I image we could use log() and
exp() from the sysem lib in all cases. Maybe the inverse trig
It's not impossible to write configury tests for accuracy of system
functions. But, of course, we don't know the cases in which we'd get
better performance by using them.