In integer math, there is an exact zero; but in the real world there isn't an exact anything..... only degrees of precision. When I was in engineering, 5 decimal places of accuracy was considered pretty good; but my space alien friends wouldn't touch anything with such sloppy tolerances. :-)
| [reply] |
I checked out another node referenced in the post replies about -0.00. Oh my!!!! This is just getting to me. Integer math or not. Philosophically or mathematically I understand where you're coming from ... but logically it doesn't make sense. By having negative zero what you have is that the following statement is not truly factual
if($x==0){print "I'm ZERO!\n");
$x could come in as -0.00 or -9.049848394839e-14. We now have problems if your referring to say dollars and cents.
I hear what you are saying ... I guess it is what it is.:o(
| [reply] |
sub comp {
my ($x,$y,$delta) = @_;
$x -$delta >= $y && $x + $delta <= $y;
}
| [reply] [d/l] |
| [reply] |