Re: Proposal: Trigonometric functions in degrees - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: Proposal: Trigonometric functions in degrees
Date
Msg-id CAEZATCWT1JVX-XeT8ghFNn84DytZ-Rw+8dZ3=u1AftM9ZerXCw@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: Trigonometric functions in degrees  (Emre Hasegeli <emre@hasegeli.com>)
Responses Re: Proposal: Trigonometric functions in degrees  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 25 October 2015 at 09:16, Emre Hasegeli <emre@hasegeli.com> wrote:
>> Currently PostgreSQL only has trigonometric functions that work in
>> radians. I think it would be quite useful to have an equivalent set of
>> functions that worked in degrees. In other environments these are
>> commonly spelled sind(), cosd(), etc.
>
> I would prefer gradian over degree.

I think gradians are generally less commonly used than degrees and
radians, so I'm less inclined to include them.

Having degree-based functions would make it trivial to implement
user-defined gradian-based functions, just by multiplying or dividing
by 0.9, and they would return exact results in the smaller number of
cases where gradian results are exactly representable.

Regards,
Dean



pgsql-hackers by date:

Previous
From: "Shulgin, Oleksandr"
Date:
Subject: Re: pg_basebackup and replication slots
Next
From: Bernd Helmle
Date:
Subject: Re: Avoid full page images in streaming replication?