1 2 Previous Next 25 Replies Latest reply on May 13, 2019 2:20 PM by Alexander Mou

    ROUND function returns strange results

    Ken Patton

      Hi all,

       

      I know there are a great many threads and a known bug around the ROUND() calculation function (especially when cast to a String), so I apologize if this is already covered elsewhere. I did search but did not find an exact match.

       

      I'd like to understand why, in 8.2,  a Calculated Field like

       

      ROUND( 11 /22)

       

      or

       

      ROUND (1 / 2)

       

      or

       

      ROUND ( 0,5 , 0 )

       

      returns  3,815,694 as a result.

       

      [In 9.0 Beta, it returns 227  .   ]

       

      Even more baffling to me, a Calculated Field of

       

      ROUND ( 0.5)   + 1

       

      returns 7,631,388 .

       

      ---

      Is this some sort of Floating Point error? (I am running Windows, 64-bit versions). Shouldn't ROUND of one half either be a zero or a one? Is this a bug or expected behavior? What workaround(s) exist(s) ?

        1 2 Previous Next