Skip to content

Commit

Permalink
feat: add trigonometry functions (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisnic committed Jul 26, 2022
1 parent aa20920 commit d83d566
Showing 1 changed file with 132 additions and 0 deletions.
132 changes: 132 additions & 0 deletions extensions/functions_arithmetic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,138 @@ scalar_functions:
required: false
- value: fp64
return: fp64
-
name: "cos"
description: "Get the cosine of a value in radians."
impls:
- args:
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- value: fp32
return: fp64
- args:
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- value: fp64
return: fp64
-
name: "sin"
description: "Get the sine of a value in radians."
impls:
- args:
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- value: fp32
return: fp64
- args:
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- value: fp64
return: fp64
-
name: "tan"
description: "Get the tangent of a value in radians."
impls:
- args:
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- value: fp32
return: fp64
- args:
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- value: fp64
return: fp64
-
name: "acos"
description: "Get the arccosine of a value in radians."
impls:
- args:
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- name: on_domain_error
options: [ NAN, ERROR ]
required: false
- value: fp32
return: fp64
- args:
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- name: on_domain_error
options: [ NAN, ERROR ]
required: false
- value: fp64
return: fp64
-
name: "asin"
description: "Get the arcsine of a value in radians."
impls:
- args:
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- name: on_domain_error
options: [ NAN, ERROR ]
required: false
- value: fp32
return: fp64
- args:
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- name: on_domain_error
options: [ NAN, ERROR ]
required: false
- value: fp64
return: fp64
-
name: "atan"
description: "Get the arctangent of a value in radians."
impls:
- args:
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- value: fp32
return: fp64
- args:
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- value: fp64
return: fp64
-
name: "atan2"
description: "Get the arctangent of values given as x/y pairs."
impls:
- args:
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- name: on_domain_error
options: [ NAN, ERROR ]
required: false
- value: fp32
- value: fp32
return: fp64
- args:
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- name: on_domain_error
options: [ NAN, ERROR ]
required: false
- value: fp64
- value: fp64
return: fp64
aggregate_functions:
- name: "sum"
description: Sum a set of values. The sum of zero elements yields null.
Expand Down

0 comments on commit d83d566

Please sign in to comment.