help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reading NaN & Inf in mex files


From: gOS
Subject: Reading NaN & Inf in mex files
Date: Tue, 5 Aug 2008 12:52:31 -0700 (PDT)

I've got a function which reads in text files formatted in a specific way.
Thanks to windows, these files can sometimes contain values like 1.#INF or
1.#IND or even 1.#QNAN. As you can see these are window's own versions of
Inf and NaN. These can also be negative.

I was able to produce an NaN value which Octave recognized as NaN with:
double nan = std::numeric_limits<long double>::quiet_NaN();

However, double inf = std::numeric_limits<long double>::infinity(); was
interpreted somewhere as meaning NaN as well instead of inf.

Does anyone have any suggestions as to how to correct this?
-- 
View this message in context: 
http://www.nabble.com/Reading-NaN---Inf-in-mex-files-tp18838647p18838647.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]