pgsql: Doc: correct overambitious precision claim for contrib/seg. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Doc: correct overambitious precision claim for contrib/seg.
Date
Msg-id E1xEAWF-00000000aXC-036F@gemulon.postgresql.org
Whole thread
List pgsql-committers
Doc: correct overambitious precision claim for contrib/seg.

seg.sgml claims that a seg can store 7 significant digits, but this
is nonsense.  The underlying float4 data type is not (quite) that
precise, and seg_out() intentionally rounds off to at most FLT_DIG
decimal places.  With IEEE float arithmetic, FLT_DIG will be defined
as 6, or at least that's the case on all platforms I know of.

AFAICT this thinko goes clear back to the introduction of seg
(commit a3694b420), but it wasn't questioned until now.

Bug: #19744
Reported-by: Ke <kehan5800@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/19744-8c700582bbb1d075@postgresql.org
Backpatch-through: 14

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/27b88e01416dfa591efbbc46f8407dc0d1dadb51

Modified Files
--------------
doc/src/sgml/seg.sgml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Doc: correct overambitious precision claim for contrib/seg.
Next
From: Nathan Bossart
Date:
Subject: pgsql: Use a non-locking initial test in TAS_SPIN on AArch64.