php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10727 print((2.3 * 100 % 100) . "<br>\n"); does not print 30 but 29
Submitted: 2001-05-08 06:24 UTC Modified: 2001-05-08 06:38 UTC
From: d dot peereboom-voller at nl dot worldonline dot com Assigned:
Status: Not a bug Package: Math related
PHP Version: 4.0.4pl1 OS: Linux
Private report: No CVE-ID: None
 [2001-05-08 06:24 UTC] d dot peereboom-voller at nl dot worldonline dot com
print((2.3 * 100 % 100) . "<br>\n");
This generated 29 
while 
print((230 % 100) . "<br>\n");
writes 30 as expected


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-08 06:38 UTC] hholzgra@php.net
this is a general problem with decimal
calculations on binary processors
and not related to php itself
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 30 22:01:28 2024 UTC