You are here: Re: PHP round() bug? « PHP Programming Language « IT news, forums, messages
Re: PHP round() bug?

Posted by Gordon Burditt on 05/25/05 01:41

><?
> $a=1.5345493;
> $b=round($a,2);
> echo "b: ".$b;
>?>
>
>This code should return "b: 1.54",

Would you care to justify that statement? WHY should
it return 1.54?

>but instead returns "b: 1.53". Can

Which I believe to be the correct answer.
>anyone else confirm this?
>
>Also, does anyone have a way around this issue?
>
>PHP 4.3.6
>Apache 1.3.33
>MySQL 3.23.49

Gordon L. Burditt

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация