Skip to content

bug: preservation of literal numbers  #2704

@pkoppstein

Description

@pkoppstein

The literal representation of certain negative numbers is not being properly preserved.

Consider:

./jq --version
jq-1.6-268-gc99981c-dirty

./jq -nM '1E1000'
1E+1000

./jq -nM '-1E1000'
-1.7976931348623157e+308 # !!!

./jq -nM '100000000000000000000000000000002'
100000000000000000000000000000002

./jq -nM '-100000000000000000000000000000002'
-1e+32 # !!!

Platform: Mac OS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions