POV-Ray : Newsgroups : povray.unofficial.patches : MegaPOV quirks and questions.. : Re: MegaPOV quirks and questions.. Server Time
2 Sep 2024 00:17:06 EDT (-0400)
  Re: MegaPOV quirks and questions..  
From: Warp
Date: 25 Jul 2000 05:34:29
Message: <397d5f25@news.povray.org>
Nathan Kopp <Nat### [at] koppcom> wrote:
: Yes.  I've known about this problem for a while now, but I don't know
: exactly how to fix it (or even how it should be fixed exactly).

  I don't think there's any portable way of detecting whether the FPU (or
the CPU for that matter) made a division by 0 or not.
  Since we are handling real numbers here (the set or real numbers does not
have +infinity nor -infinity), a division by 0 is undefined, so there's no
"correct" behaviour if it happens.
  Even if we had +infinity and -infinity, the value of 1/x when x is 0 is
undefined. You can't actually say whether it's +infinity or -infinity since
it depends on which side of the y-axis you are looking from (ie. if x
approaches 0 from the positive values, the result will approach +infinity,
but if it approaches from negative values it will be -infinity).

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.