Re: Loss of precision in intval()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/1/07, tg-php@xxxxxxxxxxxxxxxxxxxxxx <tg-php@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> Probably return "7582" instead of "7581".
>
> = = = Original message = = =
>
> On 8/1/07, Mark Summers <mark@xxxxxxxxxxxxxx> wrote:
> > This sort of thing really isn't helpful...
> >
> > <?php
> >
> > $a = 75.82 * 100;
> >
> > echo intval($a);
> >
> > ?>
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> What exactly were you expecting it to do? :)
>
>
>
> ___________________________________________________________
> Sent by ePrompter, the premier email notification software.
> Free download at http://www.ePrompter.com.
>
>

http://us.php.net/manual/en/function.intval.php#63627

erics:~ eric$ php -r 'var_dump(printf("%.13f", (75.82 * 100)));'
7581.9999999999991int(18)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux