Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1asN6z-0001O7-0y for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Apr 2016 04:18:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1asN6y-0006uX-EZ for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Apr 2016 04:18:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1asN5c-0005Ph-Lf for pgsql-hackers@postgresql.org; Tue, 19 Apr 2016 04:16:40 +0000 Received: from mail-pf0-x233.google.com ([2607:f8b0:400e:c00::233]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1asN5Z-0007QR-DC for pgsql-hackers@postgresql.org; Tue, 19 Apr 2016 04:16:40 +0000 Received: by mail-pf0-x233.google.com with SMTP id n1so2309992pfn.2 for ; Mon, 18 Apr 2016 21:16:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=BR/P/M4/rDFRj/sUeV2c9Fa61n41ZQjsimSDKoXw3Hc=; b=Z/l+ePPqBo6dgZB1I8xy0t/+zmH9Fi0LgtqVVIy3EagABLvGKQ1hCiB5Zm5wOsFS2Q lWsgUjbcsDqyc0yXlS/zlsbx71ERRmpzzzB9ifd3AuQOqJIFxPFvpfIS1G9ajqb3g79E pQ15O4ty6HiqIjdoZqKYkhgUpSO+ubO6xJIt4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=BR/P/M4/rDFRj/sUeV2c9Fa61n41ZQjsimSDKoXw3Hc=; b=LdHQ+foP4ONFSTK2bVpx8X1SuXdr79s5tIHN9AEML69O9g/6hYQwmHMjvorzQxIcXN GaxK5ibKLHaClp1xQMMOKK0fqON+kGJnDfWbMauibIILVDtnWR7F8qRG0u2pUNSyXGw4 n+CK8NKuCcQ6ffwT3otF2liRT2jtrSHKs8J81SzURsd+I7f+/SyMuRZ+rj3dpT7D1/ly d9tGkHSw2F7h8YZawMkI4widXwUGKOjLF3+uW+4EXkYtna2ch7wlDpyJS2lDHeg3uw6n PFvRjdulwQevN1k0B/yJbQqhjgQOSbM6gMeLpp5fJugzG2LjGNOhklt2LMnif3LnuTEQ djvg== X-Gm-Message-State: AOPr4FUeuc/ixBJQCWVxP3/XnFRvvoCjgbD/2mfSdJrYTveDiBt1laf107i0ABWi1ORumw== X-Received: by 10.98.16.88 with SMTP id y85mr1083836pfi.77.1461039394649; Mon, 18 Apr 2016 21:16:34 -0700 (PDT) Received: from tornado.leadboat.com (c-98-248-47-228.hsd1.ca.comcast.net. [98.248.47.228]) by smtp.gmail.com with ESMTPSA id b63sm32806634pfa.48.2016.04.18.21.16.33 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Apr 2016 21:16:33 -0700 (PDT) Date: Tue, 19 Apr 2016 00:16:31 -0400 From: Noah Misch To: Tom Lane Cc: Michael Paquier , Peter Eisentraut , Robert Haas , Dean Rasheed , "pgsql-hackers@postgresql.org" Subject: Re: [COMMITTERS] pgsql: Add trigonometric functions that work in degrees. Message-ID: <20160419041631.GC1983345@tornado.leadboat.com> References: <570311F1.6020902@gmx.net> <31479.1460152130@sss.pgh.pa.us> <5714552B.5030001@gmx.net> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32425.1461038215@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Mon, Apr 18, 2016 at 11:56:55PM -0400, Tom Lane wrote: > Noah Misch 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