Dalibor Topic wrote:
Dalibor Topic wrote:

Riccardo wrote:


I suspect that d2f is broken in the interpreter. The Java language spec demands that in case of overflow the value of float is a signed infinity, but the C standard says oveflow results in undefined behaviour. So I assume we'd have to check whether the double is representable as a float before we convert it, and handle the special cases that would invoke undefined behaviour ourself.

I'm working on a patch.


Okay, I've got a patch for the interpreter. I'm unsure if it's really necessary, or if it really fixes things, but hey, it's worth a try :)

That one didn't work that well, as it seems your netbsd2-ppc box really, really, desperately rounds to next odd no matter what. So I've got an updated patch ;)

Riccardo, could you try it out on your machine? If this one works better, I'd add a configure check for 'round to odd' and clean up the code further.

cheers,
dalibor topic

Attachment: intrp-cvt-double-float-3.diff.gz
Description: application/gzip



Reply via email to