NO

Author Topic: using NAN  (Read 3355 times)

Alessio

  • Guest
using NAN
« on: January 17, 2008, 09:50:13 PM »
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.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: using NAN
« Reply #1 on: January 17, 2008, 10:23:48 PM »
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