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="ccc31807, post: 4866997"] Test that the absolute value of the difference between the two is less than, say, 0.001, or whatever your tolerance is. You can create a user defined function that returns true or false for your convenience, like if (within_tolerance( val1, val2)) #if true { then_do_something(); } else #if false { do_something_else(); } CC [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
Compare, two identical numbers are not the same?!
Top