Wrong calculation in javascript with floats

RESOLVED DUPLICATE of bug 5856

Status

()

RESOLVED DUPLICATE of bug 5856
8 years ago
8 years ago

People

(Reporter: sworddragon2, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:2.0b7) Gecko/20100101 Firefox/4.0b7
Build Identifier: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b7) Gecko/20100101 Firefox/4.0b7

The calculation with floats in javascript aren't correct. For example 0.1 + 0.2 will give 0.30000000000000004.

Reproducible: Always

Steps to Reproduce:
1. Write javascript code which sum 0.1 and 0.2 or use the testcase in the attachment.
(Reporter)

Comment 1

8 years ago
Created attachment 497267 [details]
Testcase
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 5856
You need to log in before you can comment on or make changes to this bug.