Lack of fabsf on Solaris (patch included)

Martin Kahlert martin.kahlert@infineon.com
Thu Jan 25 05:55:00 GMT 2001


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.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /