clarification

So, if I use a floating point value of 3.123409 or any value with a decimal place in it, it will come back as some thing slightly different, like 3.123383. However, if I specify 2.0 or -3.0. Then I get back exactly 2.0 or 3.0 when I glreadpixels the pbuffer.

never mind this, it should be under the “Enabling Blend when rendering to a pbuffer” discussion topic. I pressed the wrong button… oops, sorry!

Check the IEEE specifications on floating point numbers.

Calculated floating point numbers are inaccurate by definition.

NEVER check if an calculated value equals an specified value like:

float aValue = sin(something3.1415whatever);

if( aValue == 1.0f)
{

}

The ‘if’ will fail for a lot of cases where it mathematicaly should not.

IEEE floating point numbers are just a fast approximation.

Hope that shed some light on the topic.