#!/usr/bin/perl use strict; use warnings; my $x1 = 44.7; my $x2 = 44.9-0.2; print "numbers $x1 $x2 - "; if ($x1 == $x2) { print "SAME\n"; } else { print "NOT SAME\n"; }
The result is:
numbers 44.7 44.7 - NOT SAME
This left me very much unsure. What's wrong? Perl or me?
In reply to perl numeric expressions by deckard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |