From 6afcf1f9b14d9ad0111daea549cb0db5bf7f9009 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 10 May 2014 17:18:31 +0800 Subject: [PATCH] Usermode/libm - Add hacky INFINITY and NAN macros --- Usermode/Libraries/libm.so_src/include_exp/math.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Usermode/Libraries/libm.so_src/include_exp/math.h b/Usermode/Libraries/libm.so_src/include_exp/math.h index d6d988f2..a8600121 100644 --- a/Usermode/Libraries/libm.so_src/include_exp/math.h +++ b/Usermode/Libraries/libm.so_src/include_exp/math.h @@ -12,6 +12,13 @@ extern "C" { #endif +typedef float float_t; +typedef double double_t; + + +#define INFINITY (*(float*)((uint32_t[]){0x78000000})) +#define NAN (*(float*)((uint32_t[]){0x78000001})) + extern double pow(double x, double y); extern double exp(double x); extern double log(double val); -- 2.20.1