News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

using NAN

Started by Alessio, January 17, 2008, 09:50:13 PM

Previous topic - Next topic

Alessio

Hi,

I've a huge dataset with nan values that are represented by value -9999.
I want to set those values to NAN (math.h) because I don't want
to put a check on every mathematical operation like this:

Quote-9999 * 2= -19998 ERROR!

NAN * 2 = nan OK!

When I set a variable to NAN this compiler warnings appears: "#2046: Expression with no effect removed."
There's a workaround for this ?

Thanks.

Pelle

This is a side effect of the current definition of NAN (in math.h) in v4.50; already taken care of in version 5.0. The end result should be OK, but you get this silly warning - either use warning level 1, or turn off this specific warning (#2046) for now...
/Pelle