Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aN1hY-0007CQ-29 for pgsql-hackers@arkaria.postgresql.org; Sat, 23 Jan 2016 17:10:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aN1hX-0000wQ-0G for pgsql-hackers@arkaria.postgresql.org; Sat, 23 Jan 2016 17:10:15 +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 1aN1gC-0007nT-RE for pgsql-hackers@postgresql.org; Sat, 23 Jan 2016 17:08:52 +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 1aN1g6-00048P-47 for pgsql-hackers@postgresql.org; Sat, 23 Jan 2016 17:08:51 +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 u0NH8eho028881; Sat, 23 Jan 2016 12:08:40 -0500 From: Tom Lane To: noah@leadboat.com cc: Dean Rasheed , Michael Paquier , Peter Eisentraut , PostgreSQL Hackers Subject: Re: Proposal: Trigonometric functions in degrees In-reply-to: <21072.1453513223@sss.pgh.pa.us> References: <562E82F7.2060704@gmx.net> <1671.1445890789@sss.pgh.pa.us> <5178.1445899865@sss.pgh.pa.us> <31706.1448892680@sss.pgh.pa.us> <11878.1453495831@sss.pgh! ! .pa.us> <21072.1453513223@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Fri, 22 Jan 2016 20:40:23 -0500" Date: Sat, 23 Jan 2016 12:08:40 -0500 Message-ID: <28880.1453568920@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 I wrote: > So the early returns from the buildfarm aren't very good: > * tern/sungazer isn't getting exactly 0.5 from sind(30). > The tern/sungazer result implies that this: > return (sin(x * (M_PI / 180.0)) / sin(30.0 * (M_PI / 180.0))) / 2.0; > is not producing exactly 0.5, which means that the two sin() calls aren't > producing identical results, which I suspect is best explained by the > theory that the compiler is rearranging 30.0 * (M_PI / 180.0) into > (30.0 * M_PI) / 180.0, and getting a slightly different number that way. > I think we could fix that by replacing (M_PI / 180.0) by a hard-wired > constant (computed to say 20 digits or so). 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? 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