https://issues.apache.org/bugzilla/show_bug.cgi?id=50569
--- Comment #5 from [email protected] 2011-01-12 06:10:31 EST --- Sorry! I misspoke when I said this: "because the string representation of some values were problematic for me" It wasn't the string representation, but the fact that casting from a float to a double is problematic. The current implementation is sufficient and using an epsilon would resolve this. In trying to get an accurate picture of what was going on, I thought it would be great excuse to implement this feature which I wanted in any case. Casting problem: float f1 = 333.33334f; double d1 = 333.33334d; double d2 = (double)f1; System.out.println(f1); System.out.println(d1); System.out.println(d2); Results in: f1=333.33334 d1=333.33334 d2=333.3333435058594 So d1 is not equal to d2. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
