Date: 05/29/00
- Next message: Andi Gutmans: "Re: [PHP-DEV] PHP 4.0 Bug #4676: Incorrect float calculation 5.5/2=2.5 (instead 2.75)"
- Previous message: phaigner <email protected>: "[PHP-DEV] PHP 4.0 Bug #4676: Incorrect float calculation 5.5/2=2.5 (instead 2.75)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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>
- Next message: Andi Gutmans: "Re: [PHP-DEV] PHP 4.0 Bug #4676: Incorrect float calculation 5.5/2=2.5 (instead 2.75)"
- Previous message: phaigner <email protected>: "[PHP-DEV] PHP 4.0 Bug #4676: Incorrect float calculation 5.5/2=2.5 (instead 2.75)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

