php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15979 When adding 0.01 in a loop, math starts getting incorrect
Submitted: 2002-03-09 23:55 UTC Modified: 2002-03-10 12:55 UTC
From: josh dot anderson at afraid dot org Assigned:
Status: Not a bug Package: Math related
PHP Version: 4.1.2 OS: FreeBSD 4.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
19 + 12 = ?
Subscribe to this entry?

 
 [2002-03-09 23:55 UTC] josh dot anderson at afraid dot org
http://freedns.afraid.org/tools/test.phps

http://freedns.afraid.org/tools/test.php

Here's the output of where the problem starts happening:

4.39
4.4
4.41
4.42
4.4299999999999
4.4399999999999
4.4499999999999
4.4599999999999

I get 4.4299999999999 instead of 4.43

Josh

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-10 12:55 UTC] sniper@php.net
This is not a bug. Please double-check the documentation available
at http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 20:01:29 2024 UTC