Need help in converting strings to doubles

From: Date: Mon, 29 May 2000 17:56:38 +0000
Subject: Need help in converting strings to doubles
Groups: php.dev 
Request: Send a blank email to php-dev+get-19701@lists.php.net to get a copy of this message
Guys, I wrote a conversion function which converts strings to double. I am hoping to use it instead of strtod(). The main issue I have left (except for supporting end_ptr which will take me a few minutes), is how to detect overflow and underflows and thus, support the return of +/- HUGE_VAL and the setting of errno to ERANGE like strtod() does. Does anyone here have an idea of how to write such support? The glibc source looks quite horrible. Take a look at zend_operators.c:zend_string_to_double() Thanks, Andi

« previous php.dev (#19701) next »