Closed sunsided closed 4 months ago
As was pointed out in #106, large floats, but also special floats such as NaN, result in a panic when calling F32::inv() on them.
F32::inv()
This adds a somewhat more complex check for these edge cases which in general should be easily skippable by the compiler or target.
I have defined the following:
F32(f32::from_bits(bits)).inv()
0.0
bits > 0x7f00_0000
F32(f32::INFINITY).inv()
F32(f32::NEG_INFINITY).inv()
-0.0
F32(f32::NAN).inv()
f32:NAN
As was pointed out in #106, large floats, but also special floats such as NaN, result in a panic when calling
F32::inv()
on them.This adds a somewhat more complex check for these edge cases which in general should be easily skippable by the compiler or target.
I have defined the following:
F32(f32::from_bits(bits)).inv()
is0.0
for anybits > 0x7f00_0000
.F32(f32::INFINITY).inv()
is0.0
F32(f32::NEG_INFINITY).inv()
is-0.0
F32(f32::NAN).inv()
isf32:NAN