[PHP-DEV] Need help in converting strings to doubles From: Andi Gutmans (andi <email protected>)
Date: 05/29/00

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

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>