NaN (Not a Number) exceptions
We have an application that performs a lot of calculations. We always eventually hit a NaN exception. We believe that it is not due to square root of a negative number, or division by zero, instead, we think it's just due to the fact that we perform a huge amount of computations using double values.
This problem is particularly nasty because it seems as though the JVM itself gets corrupted, so that once we receive one NaN, all other requests will get a NaN. The only way to fix this is to reboot the server.
We plan to upgrade our server to 64 bit Linux, with JDK 1.5. We are hoping that this problem will go away with this new architecture, but are skeptical.
Any ideas on how we can prevent NaN exceptions? We don't think this is a programmatic problem (it's probably a problem with the JVM implementation itself). Can someone shed some light on this subject, and offer some solutions?
Thank you!