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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: josh dot anderson at afraid dot org
New email:
PHP Version: OS:

 

 [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-2019 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 00:01:24 2019 UTC