in reply to Floating point issue

Did you Super Search for floating point first?

Recent conversation which probably answers your question

Replies are listed 'Best First'.
Re^2: Floating point issue
by vitoco (Hermit) on Aug 12, 2016 at 22:04 UTC

    Actually not. Just googled it... Thanks for the hint.

    But what made me get confused was that it happened sometimes and wanted to know why.

      Depending on your starting value, sometimes the little tiny differences round to a value that Perl's default stringification will print differently than your expected precision, and sometimes they won't.

      If you want consistent precision in output, use sprintf or printf