Pixel Invariance

Isnt the issue about 'foating point compares' similar to experimental accuracy . IE , you shouldnt code "if a==0.1" but code "if ((abs(a)-0.1) < ERROR_LEVEL)" instead ?

Grief my physics and maths teachers really must have rammed the point home about values being useless without the errors hehehe .

Obviously i really dont know how that applies to the comments about renderers . . it was more for the general coding .

-dave-
 
Actually that was the point of the whole thread. I think the argument is that bit-precision is unnecessary for 3D renderers...
 
davefb said:
you shouldnt code "if a==0.1" but code "if ((abs(a)-0.1) < ERROR_LEVEL)"

Excuse me if I'm wrong, but shouldn't it be -

Code:
if ((abs(a-0.1) < ERROR_LEVEL)

- instead?
 
i'll get my coat,,, :oops:

fwiw, i'm working on symbian which compiles for the 'simulator' using vc ( into x86), then for the hardware compiles using gnu to arm. one has hardware fp, the other doesn't . so this kinda thing does have the possibility of biting me in the ass.

-dave-
 
Back
Top