Add trigonometric functions that work in degrees.
Tom Lane <tgl@sss.pgh.pa.us>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/func.sgml | modified | +65 −7 |
| src/backend/utils/adt/float.c | modified | +436 −1 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.h | modified | +18 −0 |
| src/include/utils/builtins.h | modified | +8 −0 |
| src/test/regress/expected/float8-exp-three-digits-win32.out | modified | +77 −0 |
| src/test/regress/expected/float8.out | modified | +77 −0 |
| src/test/regress/expected/float8-small-is-zero_1.out | modified | +77 −0 |
| src/test/regress/expected/float8-small-is-zero.out | modified | +77 −0 |
| src/test/regress/sql/float8.sql | modified | +24 −0 |