[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Math patch
From: |
Brian Jones |
Subject: |
Re: Math patch |
Date: |
27 Feb 2003 18:23:06 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
"Jeroen Frijters" <address@hidden> writes:
> Hi,
>
> Attached is a small patch to java.lang.Math to make round(float) and
> round(double) do the right thing for NaN.
>
> Style wise, is it a good idea to use "a != a" to test for NaN, or should
> Double.isNaN() be used?
I went ahead and converted all the a != a to Double.isNaN or
Float.isNaN as appropriate. As mentioned previously a good JIT should
optimize this... maybe even a good byte-code compiler.
Brian
--
Brian Jones <address@hidden>