POV-Ray : Newsgroups : povray.general : Array Question : Re: Array Question Server Time
9 Aug 2024 17:15:09 EDT (-0400)
  Re: Array Question  
From: Warp
Date: 3 Jun 2000 08:14:10
Message: <3938f692@news.povray.org>
Mike Williams <mik### [at] nospamplease> wrote:
: If you subtract .1 from 1 10 times you get a number that's not quite
: exactly zero, because floating point arithmetic is never exact.
                                                     =====

  False. For some values floating point arithmetic is very exact.
  For example, 1.0+1.0 is exactly 2.0, no less, no more.

  However, for some other values it might not be. For example 0.1+0.1 may not
be exactly 0.2 (although 0.5+0.5 is exactly 1.0).

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;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.