You are here: Re: float reduced « PHP Programming Language « IT news, forums, messages
Re: float reduced

Posted by Hero Wanders on 08/28/05 19:13

Hello!

>>That *rounds* the value instead of returning the float with only the
>>last to digits of it (ok actually Thierry asked for a function which
>>returns *a* float (function give($float) { return 3.14; } would do
>>it)).
>
> When you would have bothered to look at the manual page, you would have
> noticed that the round function accepts an optional second argument to
> indicate the precision.

I knew this argument but the function still *rounds*.
That means:

3.145 --> 3.15
3.144 --> 3.14

My function gives:

3.145 --> 3.14
3.144 --> 3.14


Greetings,
Hero

 

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

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