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