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

satish.rpr has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have an issue with PERL 5.8.x and later with respect to floating point numbers.The issue is as such. The below printf statement produces the output correctly in 5.6.1 whereas the output is different in 5.8.6.Is this is bug with the new version of PERL. Any workaround for this to get the output in 5.8.1 similar to that of 5.6.1.

printf("%.32g\n",0.99999999976716936);

Perl 5.6.1 output:
0.99999999976716936 --> GOOD

Perl 5.8.6 output:
0.99999999976716925 --> ERROR