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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: d dot peereboom-voller at nl dot worldonline dot com
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2019 The PHP Group
All rights reserved.
Last updated: Fri Nov 15 05:01:41 2019 UTC