Closed Bug 280544 Opened 20 years ago Closed 20 years ago

Javascript multiplication of float values produces incorrect result

Categories

(Core :: JavaScript Engine, defect)

1.7 Branch
x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 5856

People

(Reporter: j_lozinski, Unassigned)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050128 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0+dfsg.1-2ubuntu5) Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050128 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0+dfsg.1-2ubuntu5) When multiplying the float value 2.3 by 100 the values are incorrect. example 2.3 * 100 is not 230, but 229.99999999997: Reproducible: Always Steps to Reproduce: alert(2.3*100) => result expected 230, actual 229.99999999997 alert(2.33*100) => result expected 233, actual 233 alert(2.29*100) => result expected 229, actual 229.99999999997 Actual Results: values are not always correct Expected Results: values are correct always does not appear to be true for epiphany, (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050128 Epiphany/1.5.5 (Ubuntu) (Ubuntu package 1.0+dfsg.1-2ubuntu5))
Assignee: firefox → general
Component: General → JavaScript Engine
Product: Firefox → Core
QA Contact: general → pschwartau
Version: unspecified → 1.7 Branch
This is a dup of bug 190303, which is itself probably an unmarked dup of a much older bug. /be *** This bug has been marked as a duplicate of 190303 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
The older bug is bug 5856, so anyone feeling strongly about it, feel free to reopen and redup this bug and bug 190303. /be
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.