Skip to content

ChakraCore rounds too nicely for toFixed and toPrecision #2750

@littledan

Description

@littledan

Input:

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions