Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decimal literal number #1752

Merged
merged 5 commits into from
Oct 22, 2019
Merged

Commits on Apr 4, 2019

  1. Add decNumber library

    The library adds support for decimal numbers of arbitrary length.
    Downloaded from ICU, under ICU 1.8.1 license
    http://download.icu-project.org/files/decNumber/decNumber-icu-368.zip
    Leonid S. Usov authored and wtlangford committed Apr 4, 2019
    Configuration menu
    Copy the full SHA
    b9d2d1f View commit details
    Browse the repository at this point in the history
  2. Save literal value of the parsed number to preserve it for the output

    Extend jv_number to use decNumber for storing number literals. Any math
    operations on the numbers will truncate them to double precision.
    Comparisons when both numbers are literal numbers will compare them
    without truncation.
    
    Delay conversion of numbers to doubles until a math operation is performed,
    to preserve precision. A literal jv_number will only need conversion to
    double once, and will reuse the resultant double on subsequent
    conversions.
    
    Outputting literal jv_numbers preserves the original precision.
    
    Add strong pthread requirement to manage contexts/allocations for
    converting numbers between their decNumber, string, and double formats.
    Leonid S. Usov authored and wtlangford committed Apr 4, 2019
    Configuration menu
    Copy the full SHA
    ff8924c View commit details
    Browse the repository at this point in the history
  3. [tests] print test # from the start of the tests file to help with sk…

    …ip and take
    Leonid S. Usov authored and wtlangford committed Apr 4, 2019
    Configuration menu
    Copy the full SHA
    ccc3e1f View commit details
    Browse the repository at this point in the history
  4. Add configure guards around literal jv_numbers

    Allow building jq in a mode that doesn't use decnumber for benchmarking
    purposes. decnumber support is enabled by default, and this option is
    meant to be removed once we're happy with the performance.
    wtlangford committed Apr 4, 2019
    Configuration menu
    Copy the full SHA
    2353d03 View commit details
    Browse the repository at this point in the history
  5. Remove an accidentally committed debug file

    Leonid S. Usov committed Apr 4, 2019
    Configuration menu
    Copy the full SHA
    45c8bbe View commit details
    Browse the repository at this point in the history