[kaffe] more on float_min and underflow

Dalibor Topic robilad at kaffe.org
Wed Jul 14 03:29:02 PDT 2004


Riccardo wrote:

> So the conclusion is: standard wisdom and usage on most unix system and 
> processors and so the standard libraries on them and common C use define 
> the limits with the NORMALIZED numbers.
> 
> Java spec defines the minimum as a Denormalized number.
> 
> On one side that is what I temporarily did on IRIX/MIPS: I just 
> substituted the constant. I seem to have gotten an improvment but I will 
> conduct further tests.

If the Java spec says a constant's value is X then Kaffe should use that 
constant's value. :) If an operating system's libc has a broken 
strtod/atof that fails to parse denormalized numbers correctly, then 
we'll have to find a replacement function, just like we do for 
broken/insufficient implementations of other functions in replace/ 
directory.

As far as I recall, Ito had a similar problem with Linux 2.0, and i 
think netbsd's strtod was the only replacement we found that worked well 
in the denormalized case (except from linux glibc 2.2/2.3).

See the thread at 
http://www.kaffe.org/pipermail/kaffe/2003-June/094289.html for details. 
There is a test in there that you could try, too, or adapt it to 
whatever is used to con

You may also have problems with atof, if there is no strtod on your 
platform, and of course, you may have problems if sysdepCallMethod is 
having issues with floats on your platform. But I'd guess on strtod as 
the culprit.

cheers,
dalibor topic




More information about the kaffe mailing list