POV-Ray : Newsgroups : povray.bugreports : Bug with cones : Re: Bug with cones Server Time
28 Jun 2024 01:47:31 EDT (-0400)
  Re: Bug with cones  
From: Darius Davis
Date: 18 Nov 1998 05:09:18
Message: <36528EFF.D05@acm.org>
Dan Connelly wrote:
> 
> I strongly suspect this is another manifestation of the
> large #define EPSILON 1E-5 in the config.h of Intel platforms....

My EPSILON is 1E-10, and I've got the same errors.

I believe it's simply due to the hardware.  I believe the problem is as
follows:

Calculate 1 + 1e-20, with 20 significant figures.  The answer is
1.00000000000000000001, which rounds to 1.0.  There is a total loss of
significance.  (ie. a 100% error, it's as if the 1e-20 wasn't added in
the first place)

Now, Calculate 1 + 1.4999e-19, with 20 significant figures.

The answer is 1.00000000000000000014999 (if I've got the right number of
zeroes :) and when you round that to 20 significant figures, the answer
is simply 1.0000000000000000001.  Now the actual amount added is
1.0e-19.  That's a fairly major error (about 33%).

This is essentially the cause of the problem (although the computer
rounds in binary, not decimal), and I don't believe there's anything
that can be done about it other than to change the scene file (or find
and use a more precise floating point type - which would require a
re-design of the CPU...)

I'm still not 100% sure about this diagnosis, but I am fairly confident
in it.

Cheers,

Darius Davis


Post a reply to this message

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