implement nan
BUG=3394801
Change-Id: I59ecbe23570ee66f9c62b5faa4150e108a5c09c2
diff --git a/lib/ScriptCRT/rs_cl.c b/lib/ScriptCRT/rs_cl.c
index 9d1f402..77a535b 100644
--- a/lib/ScriptCRT/rs_cl.c
+++ b/lib/ScriptCRT/rs_cl.c
@@ -469,7 +469,12 @@
extern float __attribute__((overloadable)) modf(float, float *);
FN_FUNC_FN_PFN(modf);
-//extern float __attribute__((overloadable)) nan(uint);
+extern float __attribute__((overloadable)) nan(uint v) {
+ float f[1];
+ uint32_t *ip = (uint32_t *)f;
+ *ip = v | 0x7fc00000;
+ return f[0];
+}
extern float __attribute__((overloadable)) nextafter(float, float);
FN_FUNC_FN_FN(nextafter)