Re: Null 32bit floating data
Posted by
simone pilozzi on
URL: http://quantlib.414.s1.nabble.com/Null-32bit-floating-data-tp288p290.html
Hi Luigi,
I was wrong, the Null<Real>() works correctly.
The trouble was coming from a Bloomberg time series that was empty at some target calendar date.
In order to filter those data I used the find(QuantLib::Date t) method for a timeseries.
Using a condition like this
QuantLib::TimeSeries<Real>::const_iterator =i = ts.find(t);
// ts some timeseries<Real>
//t some Date
if (i->second != Null<Real>())
CODE....
works correctly
Before I used a condition like
if(i != ts.end())
........
Thanks
On 15 November 2010 11:54, Luigi Ballabio
<[hidden email]> wrote:
On Thu, 2010-11-11 at 17:33 +0100, simone pilozzi wrote:
> I need a filter for 3.4028234663852886e+038 the no value for 32bit
> floating data (data points are coming from a bloomberg terminal).
> Apparently the Null<Real>() does not work.
> Are there remedies better than instantiate a new variable for this
> value ?
I'm not sure I follow. You mean that (x == Null<Real>()) doesn't work?
If it doesn't, what's the difference between the two numbers?
Luigi
--
A debugged program is one for which you have not yet found the
conditions that make it fail.
-- Jerry Ogdin
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users