Comment 1 for bug 953112

Revision history for this message
vanh souvanlasy (vanh-souvanlasy) wrote :

Looks like the internal test of value range is done between a double and a float.
For a float -0.1 is stored as value=-0.100000001 and stored in a double as min=-0.10000000000000001
The double were used for the range and float was used for value to test.
Which fails the test: if ( (value>=min)&&(value<=max))
value is smaller than min

A simple solution would be to cast double to float before comparing the two values.