floating point underflow; exception on attempt to print value less than DBL_MIN
Tom Tromey
tromey@redhat.com
Fri Mar 22 17:46:00 GMT 2002
>>>>> "Loren" == Loren James Rittle <rittle@latour.rsch.comm.mot.com> writes:
Loren> static const jdouble MIN_VALUE = <min value [1]>
Loren> [1] however the value printed on i386-*-freebsd4.5 is actually less
Loren> than the system's DBL_MIN. 4.9406564584124654e-324 is printed
Loren> as it should for Java there yet 2.2250738585072034e-308 is the
Loren> published minimum (same as on alpha-*-freebsd*).
I assume that DBL_MIN is the minimum normal number, and the Java
Double.MIN_VALUE is denormalized.
Loren> Given that a value smaller than DBL_MIN is appearing makes me
Loren> question that something else is wrong with this port
Loren> configuration.
Not necessarily.
Loren> What sort of patch would be accepted, if any? While sorting
Loren> out C++ library issues, I have noticed that this ieee math
Loren> implementation appears to be configured differently than most
Loren> other platforms by default. In conjunction with the exception
Loren> on overflow/underflow, we see the additional complications.
It sounds like libgcj might see these floating point exceptions at
runtime, which we definitely don't want. Is there something we can
call at runtime to tell the system not to generate these?
If there is, then libgcj ought to call it. So should gcjh.
This will no doubt require configure hacking.
If you can find such a call, modify your test program to use it and
then see what happens.
Failing that, I suppose we could link gcjh against something like
fdlibm. That might be painful. And it won't solve potential problems
in libgcj.
If you have other ideas, feel free...
Tom
More information about the Java
mailing list