summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorLeonid S. Usov <leonid@practi.net>2018-10-19 21:57:41 +0300
committerWilliam Langford <wlangfor@gmail.com>2019-10-22 14:11:04 -0400
commitcf4b48c7ba30cb30e116b523cff036ea481459f6 (patch)
treeb6d5a0ed3286e77d7d1fb84e8bec3c33686dd96e /Makefile.am
parentb6be13d5de6dd7d8aad5fd871eb6b0b30fc7d7f6 (diff)
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.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am12
1 files changed, 9 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 0dd1906f..9ff75274 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,6 +11,8 @@ LIBJQ_SRC = src/builtin.c src/bytecode.c src/compile.c src/execute.c \
src/jq_test.c src/jv.c src/jv_alloc.c src/jv_aux.c \
src/jv_dtoa.c src/jv_file.c src/jv_parse.c src/jv_print.c \
src/jv_unicode.c src/linker.c src/locfile.c src/util.c \
+ src/decNumber/decContext.c src/decNumber/decNumber.c \
+ src/jv_dtoa_tsd.c \
${LIBJQ_INCS}
### C build options
@@ -186,9 +188,13 @@ EXTRA_DIST = $(DOC_FILES) $(man_MANS) $(TESTS) $(TEST_LOG_COMPILER) \
tests/modules/test_bind_order.jq \
tests/modules/test_bind_order0.jq \
tests/modules/test_bind_order1.jq \
- tests/modules/test_bind_order2.jq tests/onig.supp \
- tests/onig.test tests/optional.test tests/setup \
- tests/torture/input0.json tests/utf8-truncate.jq
+ tests/modules/test_bind_order2.jq \
+ tests/onig.supp tests/local.supp \
+ tests/onig.test tests/setup tests/torture/input0.json \
+ tests/optional.test tests/optionaltest \
+ tests/utf8-truncate.jq tests/utf8test \
+ tests/base64.test tests/base64test \
+ tests/jq-f-test.sh tests/shtest
# README.md is expected in Github projects, good stuff in it, so we'll
# distribute it and install it with the package in the doc directory.