Re: How to transfer "2.2864849511949E+190" to a normal-human-readable number?
| From: | Ben Peter | Date: | Fri, 16 Feb 2001 10:28:06 +0000 |
| Subject: | Re: How to transfer "2.2864849511949E+190" to a normal-human-readable number? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-40126@lists.php.net to get a copy of this message | ||
Hi,
I tried
<? $foo = 2.2864849511949E+190; settype($foo,"double"); printf("%d\n",
$foo) ?>
which gave me
-2147483648
echo $foo gives
2.2864849511949E+190
- This looks like the number is too large for printf (the 'human
readable form' printed by printf is abviously wrong).
Does anybody know such of limits to sprintf?
Ben
SED wrote:
>
> Hi,
>
> I'm multiplying floating numbers:
>
> $result = $foo * $boo; and the result is like this:
>
> echo "$result";
>
> And the result is like this:
>
> 2.2864849511949E+190
>
> How can I transfer this to normal-human-readable number?
>
> Regards,
> Sumarlidi Einar Dadason
>
> SED - Graphic Design
>
> ------------------------------------------
> Phone: (+354) 4615501
> Mobile: (+354) 8960376
> Fax: (+354) 4615503
> E-mail: sed@sed.is
> Homepage: www.sed.is <- New Homepage!
> ------------------------------------------
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net