From 361bedf0b98afcb4df6d0951dca06117aaff1009 Mon Sep 17 00:00:00 2001 From: HuangRui Date: Thu, 5 Feb 2015 12:26:20 +0800 Subject: [PATCH] Optimization of memory usage when using double pow(double x, double y). --- app/libc/c_math.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/libc/c_math.c b/app/libc/c_math.c index ae44335f..622a942d 100644 --- a/app/libc/c_math.c +++ b/app/libc/c_math.c @@ -1,5 +1,6 @@ #include "c_math.h" #include "c_types.h" +#include "user_config.h" double floor(double x) { @@ -10,7 +11,7 @@ double floor(double x) #define MINEXP -2047 /* (MIN_EXP * 16) - 1 */ #define HUGE MAXFLOAT -double a1[] = +double a1[] ICACHE_STORE_ATTR ICACHE_RODATA_ATTR = { 1.0, 0.95760328069857365, @@ -30,7 +31,7 @@ double a1[] = 0.52213689121370692, 0.50000000000000000 }; -double a2[] = +double a2[] ICACHE_STORE_ATTR ICACHE_RODATA_ATTR = { 0.24114209503420288E-17, 0.92291566937243079E-18,