Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Floor - floor(16.9 * 100) = 1689 ?
duch4ever
post
Post #1





Grupa: Zarejestrowani
Postów: 155
Pomógł: 0
Dołączył: 22.06.2010

Ostrzeżenie: (0%)
-----


Jak w temacie: http://sandbox.onlinephpfunctions.com/code...7e5d74db5e26f24
Wytłumaczy ktoś?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
duch4ever
post
Post #2





Grupa: Zarejestrowani
Postów: 155
Pomógł: 0
Dołączył: 22.06.2010

Ostrzeżenie: (0%)
-----


Cytat
This can lead to confusing results: for example, floor((0.1+0.7)*10) will usually return 7 instead of the expected 8, since the internal representation will be something like 7.9999999999999991118....

Dzięki, temat do zamknięcia.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 18.10.2025 - 04:43