Skip to content

Wrong math for big integers #2962

@baterflyrity

Description

@baterflyrity

Describe the bug
This issue is extracted from #2939 (comment) to avoid spam and clarify comments.

Basically, arithmetic just wrong.

To Reproduce

$ echo 13911860366432393 | jq ".-10"
13911860366432380

Expected behavior

Should be 13911860366432383 or at least 13911860366432382.

Environment (please complete the following information):

  • OS and Version: Windows 10 x64
  • jq version: jq-1.7-dirty

Additional context

Please, read preceding comment corresponding to this issue in original thread.

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