pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Doc: correct overambitious precision claim for contrib/seg.
Date: Tue, 06 Oct 2026 19:08:07 +0000
Message-ID: <E1xEAWF-00000000aXJ-0Mw1@gemulon.postgresql.org> (raw)

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_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/39883fa022aeba59c2570c5ab046af2307f85acf

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



view thread (7+ messages)  latest in thread

Message-ID: <E1xEAWF-00000000aXJ-0Mw1@gemulon.postgresql.org>
Permalink:  ../E1xEAWF-00000000aXJ-0Mw1@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xEAWF-00000000aXJ-0Mw1@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Doc: correct overambitious precision claim for contrib/seg.
  In-Reply-To: <E1xEAWF-00000000aXJ-0Mw1@gemulon.postgresql.org>
  References: <E1xEAWF-00000000aXJ-0Mw1@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox