January 30, 2008

Here is a sample java program that I wrote. It shows that for all of Double, double, Float, float you can’t rely on default rounding operation of java/jvm. I think even JVM to JVM implementation (sun windows jvm vs ibm linux jvm for example) the output may vary. Can someone confirm it?