php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20440 wrong output for simple calculation
Submitted: 2002-11-15 02:18 UTC Modified: 2002-11-15 02:20 UTC
From: wico at cnh dot nl Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.2.3 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: wico at cnh dot nl
New email:
PHP Version: OS:

 

 [2002-11-15 02:18 UTC] wico at cnh dot nl
Try:
<?
  die(209 - 208.17);
?>

outputs: 
 0.83000000000001
should be just:
 0.83

Gr,

Wico

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-15 02:20 UTC] derick@php.net
Read the part about Floating Point precision in our manual:

http://www.php.net/manual/en/printwn/language.types.float.php

Derick
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 12:01:33 2025 UTC