Fw: [PHP-DOC] #28414 [NEW]: decimals in float
| From: | Nuno Lopes | Date: | Mon, 17 May 2004 13:12:50 +0000 |
| Subject: | Fw: [PHP-DOC] #28414 [NEW]: decimals in float | ||
| Groups: | php.doc.de | ||
| Request: | Send a blank email to doc-de+get-1157@lists.php.net to get a copy of this message | ||
Can anyone translate this to me (if it applyes to the english docs) or
correct the bug, please?
Thanks,
Nuno
----- Original Message -----
> From: udo dot steinbach at ewetel dot net
> Operating system: Windows
> PHP version: 4.3.6
> PHP Bug Type: Documentation problem
> Bug description: decimals in float
>
> Description:
> ------------
> My english is to bad, so in german.
>
> In /de/language.types.float.html heißt es
> > Das gründet sich auf die Tatsache, dass es unmöglich ist, manche
> Dezimal-Zahlen durch eine endliche Anzahl an Nachkomma-Stellen
> darzustellen
>
> Das ist zwar richtig, aber die falsche Erklärung für den Satz davor
> > So wird floor((0.1 + 0.7) * 10) normalerweise 7
>
> Siehe news:m3wvqvu656.fsf@penguin.slac.stanford.edu und
> news:3848a517.19666898@news.btx.dtag.de
> > Die Basis 10 ist inkommensurabelk mit der Basis 2. Auf binaer
> arbeitenden Gleitkommahardwares wird daher (change - dollar_amount) = 1/10
> auf der Hardware nicht exakt darstellbar sein, sondern so etwas wie
> 0.0999… sein. Damit ist int(100*...)=9.
>
> --
> Edit bug report at http://bugs.php.net/?id=28414&edit=1