help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] Uninitialized variables and signaling NaNs


From: Brian Gough
Subject: Re: [Help-gsl] Uninitialized variables and signaling NaNs
Date: Tue, 10 Aug 2010 21:23:47 +0100
User-agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.2 Mule/6.0 (HANACHIRUSATO)

At Sun, 8 Aug 2010 13:12:00 -0400,
Andrew W. Steiner wrote:
>      There was recently a big discussion in the D0 collaboration
> at Fermilab about a signaling NaN popping up in uninitialized variables.
> To use some GSL code to demonstrate the issue, I've copied
> some of cdf/cauchyinv.c from 1.14 below (edited to make it compact).
> [I'm not a member of D0 myself and don't have access to their
> code.] The issue is that the optimizer is free to load values in the register
> if it likes, and in particular it may do so with the variable 'x'.
> Unfortunately since x is uninitialized, the value of x is determined
> by whatever happens to be in memory, i.e. it might contain
> a signaling NaN. In that case, a floating point exception is
> triggered and the code crashes. 

If that happens in the example you gave it is a compiler problem for sure.

-- 
Brian Gough




reply via email to

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