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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

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: Sat Dec 21 17:01:58 2024 UTC