pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: noah@leadboat.com
Cc: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Proposal: Trigonometric functions in degrees
Date: Sat, 23 Jan 2016 12:08:40 -0500
Message-ID: <28880.1453568920@sss.pgh.pa.us> (raw)
In-Reply-To: <21072.1453513223@sss.pgh.pa.us>
References: <CAEZATCXxdzxb2Mvi0-Xvp43tfvw-bUi703HdAJuLUd7dt5-ZgQ@mail.gmail.com>
	<562E82F7.2060704@gmx.net>
	<CAEZATCXRWw9qnWFMrh-B+gbNuVNG3HKgpHgTY1kZ=OhdoGE1Wg@mail.gmail.com>
	<1671.1445890789@sss.pgh.pa.us>
	<CAEZATCXr7yioJHRXjgnu6f2W=tH5zuPtGmvxV0eT3WPgGKpSQg@mail.gmail.com>
	<5178.1445899865@sss.pgh.pa.us>
	<CAEZATCVZS+ccaEXNA-5qE=spk11Vtyxg8ePG_0RqpS1sjE==SA@mail.gmail.com>
	<CAEZATCV+6r0B1KG9KBFDY7K-9OyeAd5=UfwvR0YhGJgRJgWSOw@mail.gmail.com>
	<CAB7nPqS+wg+iWeL7pC1MS3ELmf4==XjJewH9_HPk+jx4NQ1E-g@mail.gmail.com>
	<CAB7nPqQ+KEtNXKUBNEzpOj4AESC8ipB3gUpgdbOb+b3KRgqzCw@mail.gmail.com>
	<CAEZATCW=tjGftAW44UcwpO419T83ZvdPC5vKH59WmDAA=7XjMw@mail.gmail.com>
	<CAEZATCUyVFyu2MFLk2uM28VQH2DmE=ryCuj8weBvyDOVe=8O2w@mail.gmail.com>
	<CAB7nPqQdichAyq3iNo_Ym9jgo6XkyuhivTV5tCG3E9Z_drCo6A@mail.gmail.com>
	<CAB7nPqRk+nNpJZ=AD8pG3305Bq9XwPrqEw4GUJhOk0XJ174W3w@mail.gmail.com>
	<31706.1448892680@sss.pgh.pa.us>
	<CAEZATCXO_ZVuj7xCco4GAFa_=KLJk3=aKnODLM47HB0SY=GKqw@mail.gmail.com>
	<11878.1453495831@sss.pgh! ! .pa.us>
	<21072.1453513223@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

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



view thread (57+ messages)  latest in thread

Message-ID: <28880.1453568920@sss.pgh.pa.us>
Permalink:  ../28880.1453568920@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28880.1453568920@sss.pgh.pa.us

 · 

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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, noah@leadboat.com, dean.a.rasheed@gmail.com, michael.paquier@gmail.com, peter_e@gmx.net
  Subject: Re: Proposal: Trigonometric functions in degrees
  In-Reply-To: <28880.1453568920@sss.pgh.pa.us>
  References: <CAEZATCXxdzxb2Mvi0-Xvp43tfvw-bUi703HdAJuLUd7dt5-ZgQ@mail.gmail.com> <1671.1445890789@sss.pgh.pa.us> <CAEZATCXr7yioJHRXjgnu6f2W=tH5zuPtGmvxV0eT3WPgGKpSQg@mail.gmail.com> <5178.1445899865@sss.pgh.pa.us> <CAEZATCVZS+ccaEXNA-5qE=spk11Vtyxg8ePG_0RqpS1sjE==SA@mail.gmail.com> <CAEZATCV+6r0B1KG9KBFDY7K-9OyeAd5=UfwvR0YhGJgRJgWSOw@mail.gmail.com> <CAB7nPqS+wg+iWeL7pC1MS3ELmf4==XjJewH9_HPk+jx4NQ1E-g@mail.gmail.com> <CAB7nPqQ+KEtNXKUBNEzpOj4AESC8ipB3gUpgdbOb+b3KRgqzCw@mail.gmail.com> <CAEZATCW=tjGftAW44UcwpO419T83ZvdPC5vKH59WmDAA=7XjMw@mail.gmail.com> <CAEZATCUyVFyu2MFLk2uM28VQH2DmE=ryCuj8weBvyDOVe=8O2w@mail.gmail.com> <CAB7nPqQdichAyq3iNo_Ym9jgo6XkyuhivTV5tCG3E9Z_drCo6A@mail.gmail.com> <CAB7nPqRk+nNpJZ=AD8pG3305Bq9XwPrqEw4GUJhOk0XJ174W3w@mail.gmail.com> <31706.1448892680@sss.pgh.pa.us> <CAEZATCXO_ZVuj7xCco4GAFa_=KLJk3=aKnODLM47HB0SY=GKqw@mail.gmail.com> <21072.1453513223@sss.pgh.pa.us> <28880.1453568920@sss.pgh.pa.us>

* 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