The pico-sdk handles inf - inf in __wrap___aeabi_fsub, and correctly returns nan.
But inf + (-inf) is not handled correctly and returns inf, when it should return nan. It looks like __wrap___aeabi_fadd needs to have similar handling to fsub to detect this case.
The
pico-sdk
handlesinf - inf
in__wrap___aeabi_fsub
, and correctly returnsnan
.But
inf + (-inf)
is not handled correctly and returnsinf
, when it should returnnan
. It looks like__wrap___aeabi_fadd
needs to have similar handling to fsub to detect this case.Reproduction in MicroPython with
pico-sdk
v1.5.1:But with subtraction it's correct: