1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00

Add trigonometric functions that work in degrees.

The implementations go to some lengths to deliver exact results for values
where an exact result can be expected, such as sind(30) = 0.5 exactly.

Dean Rasheed, reviewed by Michael Paquier
This commit is contained in:
Tom Lane
2016-01-22 15:46:22 -05:00
parent fd5200c3dc
commit e1bd684a34
10 changed files with 860 additions and 9 deletions

View File

@@ -407,6 +407,14 @@ extern Datum dcos(PG_FUNCTION_ARGS);
extern Datum dcot(PG_FUNCTION_ARGS);
extern Datum dsin(PG_FUNCTION_ARGS);
extern Datum dtan(PG_FUNCTION_ARGS);
extern Datum dacosd(PG_FUNCTION_ARGS);
extern Datum dasind(PG_FUNCTION_ARGS);
extern Datum datand(PG_FUNCTION_ARGS);
extern Datum datan2d(PG_FUNCTION_ARGS);
extern Datum dcosd(PG_FUNCTION_ARGS);
extern Datum dcotd(PG_FUNCTION_ARGS);
extern Datum dsind(PG_FUNCTION_ARGS);
extern Datum dtand(PG_FUNCTION_ARGS);
extern Datum degrees(PG_FUNCTION_ARGS);
extern Datum dpi(PG_FUNCTION_ARGS);
extern Datum radians(PG_FUNCTION_ARGS);