summaryrefslogtreecommitdiff
path: root/Makefile.fetch
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-02-15 09:20:52 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-02-17 21:46:58 +0100
commit9eb9083ff2fdaeb96399a0830a4394de4e29ef64 (patch)
tree046cc63551286fb3e59c6b79ebeea505a23b2eb0 /Makefile.fetch
parentee373f34ae1509e8d9fffaf4b5140ee9c35e8d41 (diff)
Use Dragonbox to implement doubleTo*String*
This header-only library is accurate in decimal representation of doubles; provides API that allows to create custom representation - so it's possible to use custom decimal separators and grouping. This allows to unify all corner cases: integers, numbers close to DBL_MAX, up-rounding to the next decade. Note that Dragonbox creates the shortest decimal representation of the number, that is unambiguously convertible back to the same number; thus it may hide trailing digits that are unneeded for such conversion. The functional changes are minimal, and beneficial: 1. Rounding numbers close to DBL_MAX now takes into account the bEraseTrailingDecZeros argument, as it should, allowing to have "1.8E+308" for rounding DBL_MAX to 2 decimals without trailing zeroes, instead of previous "1.80E+308". 2. Incorrect rounding is fixed in some cases, e.g. 9.9999999999999929 rounded to 10 previously using rtl_math_DecimalPlaces_Max. 3. Representing the number in the shortest way may change display of some printed numbers. E.g., 5th greatest double is represented as "1.797693134862315E+308" instead of a bit longer, but giving the same double on roundtrip, "1.7976931348623149E+308". This would generally look better for some numbers similar to the famous 0.1, where users would likely expect more "round" representation where it's unambiguous (but we still truncate to 15 significant decimals anyway - so there's no point in pretending to provide exact digits for actual binary representation). These are reflected in the unit tests affected by the change. Change-Id: I05e20274a30eec499593ee3e9ec070e1269232a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129948 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'Makefile.fetch')
-rw-r--r--Makefile.fetch1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile.fetch b/Makefile.fetch
index 78ff78b9e312..af6f0ce7aa5f 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -110,6 +110,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S
$(call fetch_Optional,CAIRO,PIXMAN_TARBALL) \
$(call fetch_Optional,CDR,CDR_TARBALL) \
$(call fetch_Optional,CLUCENE,CLUCENE_TARBALL) \
+ DRAGONBOX_TARBALL \
DTOA_TARBALL \
$(call fetch_Optional,LIBCMIS,LIBCMIS_TARBALL) \
$(call fetch_Optional,COINMP,COINMP_TARBALL) \