chakra-core / chakra-core/ChakraCore
[Bug]: A problem about rounding double precision floating point numbers
Open
Duplicate
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
### ChakraCore Version
36becec
### Steps to reproduce
When I use the 'print()' method to output an array containing a specific double-precision floating-point number, there is an unexpected rounding error in the last digit. Should the binary representation of the value be stored accurately?
### Proof of concept
```js
const testNumber = 9.758231785433683;
const numberArray = [testNumber];
print(numberArray);
```
### Exception or Error
```text
9.758231785433682
```
### Additional Context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.