Re: Ryu floating point output patch - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: Ryu floating point output patch
Date
Msg-id 875zumi9k0.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: Ryu floating point output patch  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Ryu floating point output patch  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List pgsql-hackers
Next version.

Changes since previous patch:

1. Remove "ryu_" from the name of interface functions; it seems better
to name them according to functionality rather than enshrining the
algorithm name. double_to_shortest_decimal*() and
float_to_shortest_decimal*() are the new names. common/ryu.h renamed
to common/shortest_dec.h accordingly.

2. Revert the removal of upstream's declaration-after-statements, and
add makefile foo to compile without warning about same. Other style
aspects (indentation, comments) still follow our style rather than
upstream's.

3. This patch _includes_ the strtof() patch that was also posted
separately; this is because we need accurate float4in in order to get
round-trip conversions to work for the edge case.

4. Passes regression tests (existing tests either by changing the
output, where the result is reasonably expected to be bit-exact; or by
locally setting extra_float_digits=0 to restore the old output, where
the output is not expected to be bit-exact).

Still to be done: docs, which are still waiting on final decisions on
the questions I asked upthread.

-- 
Andrew (irc:RhodiumToad)


Attachment

pgsql-hackers by date:

Previous
From: Vik Fearing
Date:
Subject: Re: Prepare Transaction support for ON COMMIT DROP temporary tables
Next
From: Andrew Gierth
Date:
Subject: Re: Ryu floating point output patch