http://www.perlmonks.org?node_id=1016165


in reply to IEEE-754 calculation - best way?

In perl, all fractional numbers, and most operations on them, are performed internally using "C" doubles. The artefacts you are seeing are from when you ask perl to convert that value into a string (e.g. with print, or when you try to eval a string). When perl stringifies a number, it does it to a particular default precision, for example to 15 decimal places. If you don't like this default, then yes, you'll need to use sprintf or similar.

Dave.