chakra-core / chakra-core/ChakraCore
ChakraCore rounds too nicely for `toFixed` and `toPrecision`
Open
Bug
Severity: 2
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Input:
```js
1.1.toFixed(20);
1.1.toPrecision(21)
```
These should both output `"1.10000000000000008882"`, and do so in other engines. See the loop in step 8 of https://tc39.github.io/ecma262/#sec-number.prototype.tofixed -- The algorithm is different (simpler) than Number.prototype.toString.
Contributor guide
Assessment
This issue has not been assessed yet.