Long.MIN_VALUE multiplied by 1.1f returns wrong value
Generates text that depends on changing data (like dynamic HTML).
Brought to you by:
revusky
(This is possibly a duplicate post from one I just tried to make)
-9223372036854775808(Long) multiplied by 1.1(Float) = -1.0145709460442579E19(Double)
The result should be -10145709240540253388.8 using the ArithmeticEngine.CONSERVATIVE_ENGINE.
I suspect that when widening the Float you call floatValue() instead of toString().
That result is as precise as it can get without working with BigDecimal-s, which is the point of CONVERSATIVE_ENGINE. In fact, it's still more precise than Java/C, because those would do the multiplication with float precision, while the CONVERSATIVE_ENGINE does it with double precision. Also, note that 1.1f (the input) is already an approximation, as 1.1 can't be expressed precisely in a 2-based number system, so you have already lost the hope for getting the real result there.
(Of course, BIGDECIMAL_ENGINE, which is the default, gives the exact result, assuming 1.1 wasn't given in floating point form, which thus would be already imprecise.)