ANN: QNaNs.jl (easier quiet NaNs)

numbers

#1

QNaNs.jl

Simplifies the use of quiet NaNs to propagate information from within numerical computations.

####Quick Look

> Pkg.add("QNaNs")
> using QNaNs

> a_qnan = qnan(36)
NaN
> payload = qnan( a_qnan )
36

> typeof(a_qnan)
Float64
> isnan(a_qnan), isnan(NaN)   # quiet NaNs areNaNs
true, true

# works with Float64, Float32 and Float16    
> a_qnan32 = qnan(Int32(-77))
NaN32
> payload = qnan( a_qnan32 );
>  payload, typeof(payload)
-77, Int32

the repository has a little more information


#2

That link didn’t work for me. This worked:


#3

thank you – link is updated