This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
Re: Lack of fabsf on Solaris (patch included)
On Thu, Jan 25, 2001 at 05:47:23AM -0800, Cedric Berger wrote:
> Why not simply this:
>
> jfloat java::lang::Math::abs(jfloat x)
> {
> return x < 0.0F ? -x : x;
> }
>
> And removing all this autoconf mess?
Would be nice. But i don't know, if it's correct:
Are the float types symmetric?
I.e. is -f a float if f is one? I assume not. Some IEEE expert has to
give some words of wisdom here.
I think fabs has two advantages:
it should take care of these issues and it gets inlined in gcc on some
OSes (x86 for example).
Bye,
Martin.
--
The early bird gets the worm. If you want something else for
breakfast, get up later.