Reply to Re: Missing 0.0000001 - driving me crazy - help!

Your name:

Reply:


Posted by Gordon Burditt on 12/05/05 17:03

>Variables are held to s certain degree of precision. 200.15 cannot be
>held accurately as a normal binary number, for example, so errors can
>occur.
>
>Use bcsub(200.15,200,n) where n is the number of decimal places you
>want.

Any attempt to round to "a number of decimal places" will virtually
guarantee roundoff error. There are very few non-integer decimal
numbers which can be represented exactly in binary floating
point. All of them end in 5 (plus trailing zeroes).

Gordon L. Burditt

[Back to original 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

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