Re: Need help in converting strings to doubles
| From: | thies at digicol dot de | Date: | Tue, 30 May 2000 13:40:32 +0000 |
| Subject: | Re: Need help in converting strings to doubles | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-19758@lists.php.net to get a copy of this message | ||
On Mon, May 29, 2000 at 08:56:38PM +0300, Andi Gutmans wrote:
> 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()
as i said in my 1st mail, it looks too simple...
have you had a look at the OpenBSD implemetation?
>
> Thanks,
>
> Andi
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany