pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Add trigonometric functions that work in degrees.
Date: Tue, 19 Apr 2016 00:16:31 -0400
Message-ID: <20160419041631.GC1983345@tornado.leadboat.com> (raw)
In-Reply-To: <32425.1461038215@sss.pgh.pa.us>
References: <570311F1.6020902@gmx.net>
	<31479.1460152130@sss.pgh.pa.us>
	<CA+Tgmoa1fig2OV0Mam3dPmAOhaf6T_E8CXvQsDunvDV9vYEhwg@mail.gmail.com>
	<5714552B.5030001@gmx.net>
	<CAB7nPqSvocAX1n9Wbozo8nfdOAZaA0MAxvkpwSKTFjc-0NxadQ@mail.gmail.com>
	<12238.1460985466@sss.pgh.pa.us>
	<20160419021144.GA1984253@tornado.leadboat.com>
	<20830.1461032579@sss.pgh.pa.us>
	<20160419024950.GB1983345@tornado.leadboat.com>
	<32425.1461038215@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On Mon, Apr 18, 2016 at 11:56:55PM -0400, Tom Lane wrote:
> Noah Misch <noah@leadboat.com> writes:
> > On Mon, Apr 18, 2016 at 10:22:59PM -0400, Tom Lane wrote:
> >> We could alternatively set extra_float_digits to its max value and hope
> >> that off-by-one-in-the-last-place values would get printed as something
> >> visibly different from the exact result.  I'm not sure I want to trust
> >> that that works reliably; but maybe it would be worth printing the
> >> result both ways, just to provide additional info when there's a failure.
> 
> > We'd have an independent problem if extra_float_digits=3 prints the same
> > digits for distinguishable float values, so I wouldn't mind relying on it not
> > to do that.  But can we expect the extra_float_digits=3 representation of
> > those particular values to be the same for every implementation?
> 
> Hm?  The expected answer is exact (30, 45, or whatever) in each case.
> If we get some residual low-order digits then it's a failure, so we don't
> need to worry about whether it's the same failure everywhere.

Does something forbid snprintf implementations from printing '45'::float8 as
45.0000000000000001 under extra_float_digits=3?


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (35+ messages)  latest in thread

Message-ID: <20160419041631.GC1983345@tornado.leadboat.com>
Permalink:  ../20160419041631.GC1983345@tornado.leadboat.com/
Also on:    postgresql.org/message-id/20160419041631.GC1983345@tornado.leadboat.com

 · 

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: noah@leadboat.com, tgl@sss.pgh.pa.us, michael.paquier@gmail.com, peter_e@gmx.net, robertmhaas@gmail.com, dean.a.rasheed@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Add trigonometric functions that work in degrees.
  In-Reply-To: <20160419041631.GC1983345@tornado.leadboat.com>
  References: <570311F1.6020902@gmx.net> <31479.1460152130@sss.pgh.pa.us> <CA+Tgmoa1fig2OV0Mam3dPmAOhaf6T_E8CXvQsDunvDV9vYEhwg@mail.gmail.com> <5714552B.5030001@gmx.net> <CAB7nPqSvocAX1n9Wbozo8nfdOAZaA0MAxvkpwSKTFjc-0NxadQ@mail.gmail.com> <12238.1460985466@sss.pgh.pa.us> <20160419021144.GA1984253@tornado.leadboat.com> <20830.1461032579@sss.pgh.pa.us> <20160419024950.GB1983345@tornado.leadboat.com> <32425.1461038215@sss.pgh.pa.us> <20160419041631.GC1983345@tornado.leadboat.com>

* 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