Closed
Bug 280890
Opened 20 years ago
Closed 20 years ago
Trying (17.6 * 1500) gives the wrong result in Javascript
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
People
(Reporter: shawnd, Assigned: bugzilla)
References
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
If you try:
<script type="text/javascript">
alert(17.6*1500);
</script>
The result is displayed as 26400.000000000004. It should be just 26400. The
problem can be fixed by changing the expression to (((17.6*10)*1500)/10) as a
workaround.
Reproducible: Always
Steps to Reproduce:
1. Create a html file containing <html><head><script
type="text/javascript">alert(17.6*1500);</script></head></html>
2. Load the html file
Actual Results:
It displays an alert box with the incorrect value (26400.000000000004).
Expected Results:
Displayed an alert box with the correct value (26400).
The problem occurs on Mozilla 1.2 under RedHat Linux and Firefox 1.0 in Windows XP.
Comment 1•20 years ago
|
||
*** This bug has been marked as a duplicate of 20140 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 2•20 years ago
|
||
*** Bug 280891 has been marked as a duplicate of this bug. ***
Reporter | ||
Updated•20 years ago
|
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Comment 3•20 years ago
|
||
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago → 20 years ago
Component: General → JavaScript Engine
Product: Firefox → Core
Resolution: --- → DUPLICATE
Version: unspecified → Trunk
Updated•20 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•