in reply to 4253.95 + 0.9 = 4254.84999999999 (need help to interpret internals)

Someone mentioned Math::BigFloat. I recently discovered a new-ish (as of 5.8.0) pragma use bignum which transparently overloads all things numeric with the Math::BigFoo equivalent. It's worth looking into but if you're going to be doing heavy lifting I recommend setting a precision level or using one of the alternative support libraries since the native Calc can cause problems ("precision" grows, memory consumption skyrockets, and execution time slows to a crawl).

--
I'm not belgian but I play one on TV. On dit que je parle comme un belge aussi.

  • Comment on Re: 4253.95 + 0.9 = 4254.84999999999 (need help to interpret internals)
  • Download Code