in reply to Re^2: Why is Zero not 0?
in thread Why is Zero not 0?

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. :-)

I'm not really a human, but I play one on earth. Cogito ergo sum a bum

Replies are listed 'Best First'.
Re^4: Why is Zero not 0?
by jluther (Novice) on Feb 04, 2008 at 23:00 UTC
    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(

        Did you get the + and - swapped? Now comp(5, 4.5, 1) is false and comp(5, 4.5, -1) is true.

        Personally I prefer to use the good old standard mathematical way of expressing it:

        if (abs($x - $y) <= $tolerance) { print "$x and $y are 'equal'"; }

        lodin

      $x could come in as -0.00 or -9.049848394839e-14.

      It reminds me of the attempt to detect the soul, by weighing bodies before and after death. What a mess that concept is. :-)


      I'm not really a human, but I play one on earth. Cogito ergo sum a bum