In the same way that Base exports the constants NaN16, NaN32, and NaN64, corresponding to the types Float16, Float32, and Float64, Quadmath.jl should export a NaN128 constant of type Float128.
To match the definitions in base/float.jl, we should define NaN128 as reinterpret(Float128, 0x7fff_8000_0000_0000_0000_0000_0000_0000), i.e., positive quiet NaN with all-zero payload. Note that we already do this for Inf128 but not NaN128 for some reason.
In the same way that
Baseexports the constantsNaN16,NaN32, andNaN64, corresponding to the typesFloat16,Float32, andFloat64, Quadmath.jl should export aNaN128constant of typeFloat128.To match the definitions in base/float.jl, we should define
NaN128asreinterpret(Float128, 0x7fff_8000_0000_0000_0000_0000_0000_0000), i.e., positive quiet NaN with all-zero payload. Note that we already do this forInf128but notNaN128for some reason.