CE-Programming / toolchain

Toolchain and libraries for C/C++ programming on the TI-84+ CE calculator series
https://ce-programming.github.io/toolchain/index.html
GNU Lesser General Public License v3.0
527 stars 53 forks source link

Fixed ldexpf behaviour for NaN and Inf (e.g. ldexpf(Inf, -1)) #505

Closed ZERICO2005 closed 1 month ago

ZERICO2005 commented 1 month ago

ldexpf currently checks that current_exponent + add_exponent <= exponent_max. However, subtracting from the exponent value of Inf or NaN will result in a finite value. I have fixed this so that Inf and NaN are returned unmodified.

mateoconlechuga commented 1 month ago

Thanks!