diff --git a/configure.py b/configure.py index d11ff4b0..e3e34657 100644 --- a/configure.py +++ b/configure.py @@ -1976,7 +1976,7 @@ config.libs = [ Object(Matching, "PPC_EABI/sysenv.GCN.c"), Object(Matching, "PPC_EABI/uart_console_io_gcn.c"), Object(Matching, "PPC_EABI/abort_exit_ppc_eabi.c"), - Object(NonMatching, "MSL_Common/math_sun.c"), + Object(Matching, "MSL_Common/math_sun.c", extra_cflags=["-Cpp_exceptions on"]), Object(NonMatching, "MSL_Common/extras.c"), Object(Matching, "MSL_Common_Embedded/Math/e_acos.c"), diff --git a/libs/MSL/src/MSL_Common/math_sun.c b/libs/MSL/src/MSL_Common/math_sun.c new file mode 100644 index 00000000..f58b5160 --- /dev/null +++ b/libs/MSL/src/MSL_Common/math_sun.c @@ -0,0 +1,10 @@ +#include + +double scalbn(double x, int n) { + double man; + int exponent; + + man = frexp(x, &exponent); + exponent += n; + return ldexp(man, exponent); +}