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
528 stars 53 forks source link

`scalbnf` should wrap `ldexpf` #518

Open ZERICO2005 opened 2 weeks ago

ZERICO2005 commented 2 weeks ago

float scalbnf(float x, int exp) should wrap float ldexpf(float x, int exp) instead of doing x * exp2f((float)exp). These functions are equivalent because FLT_RADIX == 2.

This could be fixed by having scalbnf as an alias to ldexpf. Similar thing for scalblnf(float x, long exp) apart from casting long to int.