Re: [math] Rounding of negative zero

2014-01-12 Thread Phil Steitz
On 1/12/14, 6:10 AM, Luc Maisonobe wrote: > Le 12/01/2014 14:57, Thomas Neidhart a écrit : >> Hi, >> >> in MATH-1070 we have discovered that calling Precision.round(x, y) >> behaves differently for float and double values when the value to be >> rounded is negative zero: >> >> Precision.round(-0.0d

Re: [math] Rounding of negative zero

2014-01-12 Thread Luc Maisonobe
Le 12/01/2014 14:57, Thomas Neidhart a écrit : > Hi, > > in MATH-1070 we have discovered that calling Precision.round(x, y) > behaves differently for float and double values when the value to be > rounded is negative zero: > > Precision.round(-0.0d, 0) = 0.0 > Precision.round(-0.0f, 0) = -0.0 >

[math] Rounding of negative zero

2014-01-12 Thread Thomas Neidhart
Hi, in MATH-1070 we have discovered that calling Precision.round(x, y) behaves differently for float and double values when the value to be rounded is negative zero: Precision.round(-0.0d, 0) = 0.0 Precision.round(-0.0f, 0) = -0.0 The reason being that in the double case, the value is converted