develooper Front page | perl.perl5.porters | Postings from March 2008

Re: [perl #52278] loop test condition inconsistency

Thread Previous
From:
Michael G Schwern
Date:
March 30, 2008 19:52
Subject:
Re: [perl #52278] loop test condition inconsistency
Message ID:
47F051CB.9020102@pobox.com
This looks like simple, and expected, floating point errors stemming from the 
way numbers are represented and is, unfortunately, not a bug.
http://perldoc.perl.org/perlfaq4.html#Why-am-I-getting-long-decimals-(eg%2c-19.9499999999999)-instead-of-the-numbers-I-should-be-getting-(eg%2c-19.95)%3f

Please let us know if you were trying to express something else.


-- 
THIS I COMMAND!

Thread Previous


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