in reply to Fun with floating points
perl -le'$x=0.05;$y=sqrt($x+$x+$x);$g="$y";print "Is $y equal to $g?"; +print $y eq $g?"Yes":"No"' Is 0.387298334620742 equal to 0.387298334620742? Yes
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Fun with floating points
by kikuchiyo (Hermit) on Nov 06, 2009 at 15:04 UTC | |
by chomzee (Beadle) on Nov 08, 2009 at 10:41 UTC |