From c92eef6ac98eaf1fd62fc70adc65dbf8af0b340a Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Thu, 3 Apr 2014 17:26:10 -0700 Subject: [PATCH] use INFINITY and NAN instead of strtod --- src/support/libsupportinit.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/support/libsupportinit.c b/src/support/libsupportinit.c index 3ba077882e61d..0cfa74d12c4bd 100644 --- a/src/support/libsupportinit.c +++ b/src/support/libsupportinit.c @@ -1,4 +1,5 @@ #include +#include #include "libsupport.h" #ifdef __cplusplus @@ -21,10 +22,10 @@ void libsupport_init(void) ios_init_stdstreams(); - D_PNAN = strtod("+NaN",NULL); - D_NNAN = -strtod("+NaN",NULL); - D_PINF = strtod("+Inf",NULL); - D_NINF = strtod("-Inf",NULL); + D_PNAN = +NAN; + D_NNAN = -NAN; + D_PINF = +INFINITY; + D_NINF = -INFINITY; isInitialized=1; } }