pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Clarify the choice of rscale in numeric_sqrt().
Date: Thu, 02 Feb 2023 09:44:52 +0000
Message-ID: <E1pNW9D-001CQw-It@gemulon.postgresql.org> (raw)

Clarify the choice of rscale in numeric_sqrt().

Improve the comment explaining the choice of rscale in numeric_sqrt(),
and ensure that the code works consistently when other values of
NBASE/DEC_DIGITS are used.

Note that, in practice, we always expect DEC_DIGITS == 4, and this
does not change the computation in that case.

Joel Jacobson and Dean Rasheed

Discussion: https://postgr.es/m/06712c29-98e9-43b3-98da-f234d81c6e49%40app.fastmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0736fc1ceb0659a9f73699910ac56603336daeee

Modified Files
--------------
src/backend/utils/adt/numeric.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)



Message-ID: <E1pNW9D-001CQw-It@gemulon.postgresql.org>
Permalink:  ../E1pNW9D-001CQw-It@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pNW9D-001CQw-It@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: dean.a.rasheed@gmail.com
  Subject: Re: pgsql: Clarify the choice of rscale in numeric_sqrt().
  In-Reply-To: <E1pNW9D-001CQw-It@gemulon.postgresql.org>
  References: <E1pNW9D-001CQw-It@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