Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aN4in-00008n-8O for pgsql-hackers@arkaria.postgresql.org; Sat, 23 Jan 2016 20:23:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aN4im-0005x1-Bb for pgsql-hackers@arkaria.postgresql.org; Sat, 23 Jan 2016 20:23:44 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aN4hT-0004Ta-1z for pgsql-hackers@postgresql.org; Sat, 23 Jan 2016 20:22:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aN4hQ-00085T-8e for pgsql-hackers@postgresql.org; Sat, 23 Jan 2016 20:22:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u0NKMEFl002998; Sat, 23 Jan 2016 15:22:14 -0500 From: Tom Lane To: Noah Misch cc: Dean Rasheed , Michael Paquier , Peter Eisentraut , PostgreSQL Hackers Subject: Re: Proposal: Trigonometric functions in degrees In-reply-to: <20160123201625.GA3691823@tornado.leadboat.com> References: <31706.1448892680@sss.pgh.pa.us> <21072.1453513223@sss.pgh.pa.us> <28880.1453568920@sss.pgh.pa.us> <20160123201625.GA3691823@tornado.leadboat.com> Comments: In-reply-to Noah Misch message dated "Sat, 23 Jan 2016 15:16:25 -0500" Date: Sat, 23 Jan 2016 15:22:14 -0500 Message-ID: <2997.1453580534@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Noah Misch writes: > On Sat, Jan 23, 2016 at 12:08:40PM -0500, Tom Lane wrote: >> So I pushed that, and tern/sungazer are still failing. Noah, could you >> trace through that and see exactly where it's going off the rails? > The second sin() is a constant, so gcc computes it immediately but sends the > first sin() to libm. The libm sin() is slightly more accurate. Ugh. "compile-time simplification uses different version of sin()" was one of the theories I had in mind, but I was hoping that wasn't it because it'd be the hardest to work around reliably. Still, I think it's doable by caching the results of the should-be-constant subexpressions. Will get on it. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers