develooper Front page | perl.perl5.porters | Postings from November 2003

sprintf %.g broken in bleadperl

Thread Next
From:
Enache Adrian
Date:
November 23, 2003 22:06
Subject:
sprintf %.g broken in bleadperl
Message ID:
20031124070834.GA1658@ratsnest.hole
On a -Duselongdouble perl:

$ perl -le 'printf "%.40g ", 0.01; print'
0.009999999999999999999796712092658967918624 
$ perl -le 'printf "%.40g", 0.01; print'
0.0100000000000000002082

Regards,
Adi

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About