Skip to content

Number as a 32-bit float #1270

@grgustaf

Description

@grgustaf

I suppose this must already be well-understood, but I left a test with a counter running over the weekend, and it got stuck at 16777216. Doing 16777216 + 1 returns 16777216. I discovered this is due to the resolution limitation of the 32-bit float.

I see in the JerryScript internals docs that this is an intentional decision, following one of the two formats from IEEE 754. However, when I look here it seems to suggest that ECMAScript is supposed to use the 64-bit format.

http://www.ecma-international.org/ecma-262/5.1/#sec-4.3.19

It sure seems like 16 million is pretty low for math to stop working. Is this seen as acceptable and a limitation JerryScript programmers should be aware of?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions