471,832 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,832 software developers and data experts.

Perl math question


When I do this in Perl:

if ((35/26) == (0.35/0.26)) {
print "equal\n";
else {
print "not equal\n";

I got "not equal". Does anyone know why? and solution?


Jan 23 '08 #1
3 1096
4,059 Expert 2GB
good question. If you get no answer here ask over on www.perlmonks.com and see if one of the gurus over there has an explanation. I would like to hear what the explanation is.
Jan 23 '08 #2
I found a simliar question in perlmonks.com.Here is the link to that question:

Thanks for help!
Jan 23 '08 #3
4,059 Expert 2GB
Cool. I should have known that, I have seen this problem before but the reason escaped me. Thanks for posting back.
Jan 23 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

58 posts views Thread by @ | last post: by
2 posts views Thread by TSO | last post: by
3 posts views Thread by Chris Pruett | last post: by
6 posts views Thread by WipeOut | last post: by
20 posts views Thread by Xah Lee | last post: by
reply views Thread by Xah Lee | last post: by
reply views Thread by Kirt Loki Dankmyer | last post: by
13 posts views Thread by squash | last post: by
reply views Thread by NeoPa | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.