Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
Compare, two identical numbers are not the same?!
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Jürgen Exner, post: 4866972"] You forgot the first commandment of computer numerics: Thou shalt not use equality for floating point numbers! See 'perldoc -q 9999' for further details. Although those seem to be unrelated questions/issues in fact they have the same underlying reason which applies to virtually all programming languages. Try printing them with 20 digits: printf("%.20f", $totalIndividualWeights) You may be surprised. jue [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
Compare, two identical numbers are not the same?!
Top