aboutsummaryrefslogtreecommitdiff
path: root/src/common/d2s.c
diff options
context:
space:
mode:
authorAndrew Gierth <rhodiumtoad@postgresql.org>2019-02-13 19:35:50 +0000
committerAndrew Gierth <rhodiumtoad@postgresql.org>2019-02-13 19:35:50 +0000
commitda6520be7f946f5f0f8fe46c34e303d1d36ee080 (patch)
tree1adaa9c0d92824ed007bcd27ea978e36523a10a1 /src/common/d2s.c
parent711bab1e4d19b5c9967328315a542d93386b1ac5 (diff)
downloadpostgresql-da6520be7f946f5f0f8fe46c34e303d1d36ee080.tar.gz
postgresql-da6520be7f946f5f0f8fe46c34e303d1d36ee080.zip
More float test and portability fixes.
Avoid assuming exact results in tstypes test; some platforms vary. (per buildfarm members eulachon, danio, lapwing) Avoid dubious usage (inherited from upstream) of bool parameters to copy_special_str, to see if this fixes the mac/ppc failures (per buildfarm members prariedog and locust). (Isolated test programs on a ppc mac don't seem to show any other cause that would explain them.)
Diffstat (limited to 'src/common/d2s.c')
-rw-r--r--src/common/d2s.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/d2s.c b/src/common/d2s.c
index 58f60977a54..1e4782c10a4 100644
--- a/src/common/d2s.c
+++ b/src/common/d2s.c
@@ -1028,7 +1028,7 @@ double_to_shortest_decimal_bufn(double f, char *result)
/* Case distinction; exit early for the easy cases. */
if (ieeeExponent == ((1u << DOUBLE_EXPONENT_BITS) - 1u) || (ieeeExponent == 0 && ieeeMantissa == 0))
{
- return copy_special_str(result, ieeeSign, ieeeExponent, ieeeMantissa);
+ return copy_special_str(result, ieeeSign, (ieeeExponent != 0), (ieeeMantissa != 0));
}
floating_decimal_64 v;