14 Jul
2005
14 Jul
'05
3:19 a.m.
On Tue, Jul 12, 2005 at 12:50:35PM -0300, João Rafael Nicola wrote:
Using floating point number the following 'then' branch will not necessarily execute:
{ double x,y; x = 5.0; y = sqrt(25.0); //or another operation resulting in '5' if ( (x/y) == 1.0) { printf("This message may appear or may not.\n"); } }
The above code isn't a good example because the most likely reason for inequality would be sqrt resulting in a number not exactly equal to 5.
Anyway, I've now added some code to bezier-utils.cpp intended to deal with the case that x / x != 1.0 (despite x being isFinite and non-zero).
Can you cvs up and tell me if it still produces any messages (and what the message says, if it does produce a message) ?
Thanks,
pjrm.