Available in versions: Dev (3.20) | Latest (3.19) | 3.18 | 3.17

Trigonometric functions

Applies to ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

Some dialects may not support all trigonometric functions.

Using Settings.transformPatternsTrigonometricFunctions, the following transformations can be achieved:

-- With Settings.transformPatternsTrigonometricFunctions active, this:
SELECT
  SIN(x) / COS(x),
  COS(x) / SIN(x),
  1 / TAN(x),
  1 / COT(x)
FROM tab;

-- ... is transformed into the equivalent expression:
SELECT
  TAN(x), -- SIN(x) / COS(x)
  COT(x), -- COS(x) / SIN(x)
  COT(x), -- 1 / TAN(x)
  TAN(x)  -- 1 / COT(x)
FROM tab;

References to this page

Feedback

Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo