I have a bea weblogic 8.1 sp5 server running on a JRockit instance with the following java version:
*java -version java version "1.4.2_10" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03) BEA JRockit(R) (build R26.3.0-32-58710-1.4.2_10-20060308-2022-linux-ia64, )*
I face an issue when the following code is executed:
int debt = 27003; //amount in cents; System.out.println(((double) debt18 / 100)); //amount in euro
The printed result is 270.03000000000003
I am sure that this is a virtual machine error since it is observable on this particular jrockit machine.
Do you happen to face a similar problem in the past?
Can you please tell me a less error-prone way to pass the wanted value to a double variable,preferably using standard java libraries?