Describe the bug
Wrong result from Number.prototype.toFixed
To Reproduce
const a = 1.25.toFixed(1);
console.log(a);
Expected behavior
Running this code, a should be set to "1.3" and printed, but a is instead set to "1.2". The expected behaviour can be found in the ECMAScript specification.
Build environment (please complete the following information):
- OS: macOS arm64
- Version: latest
- Target triple: aarch64-apple-darwin
- Rustc version: rustc 1.67.0 (fc594f156 2023-01-24)
Additional context
Add any other context about the problem here.
Describe the bug
Wrong result from
Number.prototype.toFixedTo Reproduce
Expected behavior
Running this code,
ashould be set to"1.3"and printed, butais instead set to"1.2". The expected behaviour can be found in the ECMAScript specification.Build environment (please complete the following information):
Additional context
Add any other context about the problem here.