Skip to content

Commit

Permalink
feat: add cosh sinh tanh
Browse files Browse the repository at this point in the history
  • Loading branch information
richtia committed Jul 28, 2023
1 parent 933c907 commit 738c629
Show file tree
Hide file tree
Showing 9 changed files with 192 additions and 0 deletions.
39 changes: 39 additions & 0 deletions cases/arithmetic/cosh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
function: cosh
cases:
- group:
id: basic
description: Basic examples without any special cases
args:
- value: 0.00
type: fp32
result:
value: 1.0
type: fp32
- group: basic
args:
- value: 1.0
type: fp64
result:
value: 1.5430806348152437
type: fp64
- group: basic
args:
- value: 7.0000009
type: fp64
result:
value: 548.3175286399451
type: fp64
- group: basic
args:
- value: -7.00000095
type: fp64
result:
value: 548.3175560557769
type: fp64
- group: basic
args:
- value: null
type: fp64
result:
value: null
type: fp64
39 changes: 39 additions & 0 deletions cases/arithmetic/sinh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
function: sinh
cases:
- group:
id: basic
description: Basic examples without any special cases
args:
- value: 0.0
type: fp32
result:
value: 0.0
type: fp32
- group: basic
args:
- value: 1.0
type: fp64
result:
value: 1.1752011936438014
type: fp64
- group: basic
args:
- value: 7.0000009
type: fp64
result:
value: 548.3166167588001
type: fp64
- group: basic
args:
- value: -7.0000009
type: fp64
result:
value: -548.3166167588001
type: fp64
- group: basic
args:
- value: null
type: fp64
result:
value: null
type: fp64
39 changes: 39 additions & 0 deletions cases/arithmetic/tan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
function: tan
cases:
- group:
id: basic
description: Basic examples without any special cases
args:
- value: 0.0
type: fp32
result:
value: 0.0
type: fp32
- group: basic
args:
- value: 1.0
type: fp64
result:
value: 0.8414709848078965
type: fp64
- group: basic
args:
- value: 7.0000009
type: fp64
result:
value: 0.6569872772305518
type: fp64
- group: basic
args:
- value: -7.0000009
type: fp64
result:
value: -0.6569872772305518
type: fp64
- group: basic
args:
- value: null
type: fp64
result:
value: null
type: fp64
39 changes: 39 additions & 0 deletions cases/arithmetic/tanh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
function: tanh
cases:
- group:
id: basic
description: Basic examples without any special cases
args:
- value: 0.0
type: fp32
result:
value: 0.0
type: fp32
- group: basic
args:
- value: 1.0
type: fp64
result:
value: 0.7615941559557649
type: fp64
- group: basic
args:
- value: 7.0000009
type: fp64
result:
value: 0.9999983369469382
type: fp64
- group: basic
args:
- value: -7.0000009
type: fp64
result:
value: -0.9999983369469382
type: fp64
- group: basic
args:
- value: null
type: fp64
result:
value: null
type: fp64
4 changes: 4 additions & 0 deletions dialects/datafusion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ scalar_functions:
result: fp32
- name: cos
- name: sin
- name: tan
- name: cosh
- name: sinh
- name: tanh
- name: factorial
unsupported: True
- name: abs
Expand Down
4 changes: 4 additions & 0 deletions dialects/duckdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ scalar_functions:
rounding: TIE_TO_EVEN
- name: cos
- name: sin
- name: tan
- name: cosh
- name: sinh
- name: tanh
- name: factorial
unsupported: true
- name: abs
Expand Down
4 changes: 4 additions & 0 deletions dialects/postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ scalar_functions:
- name: exp
- name: cos
- name: sin
- name: tan
- name: cosh
- name: sinh
- name: tanh
- name: factorial
- name: abs
required_options:
Expand Down
4 changes: 4 additions & 0 deletions dialects/sqlite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ scalar_functions:
- name: exp
- name: cos
- name: sin
- name: tan
- name: cosh
- name: sinh
- name: tanh
- name: factorial
unsupported: True
- name: abs
Expand Down
20 changes: 20 additions & 0 deletions dialects/velox_presto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,26 @@ scalar_functions:
- args:
- fp32
result: fp32
- name: tan
unsupported_kernels:
- args:
- fp32
result: fp32
- name: cosh
unsupported_kernels:
- args:
- fp32
result: fp32
- name: sinh
unsupported_kernels:
- args:
- fp32
result: fp32
- name: tanh
unsupported_kernels:
- args:
- fp32
result: fp32
- name: factorial
unsupported: True
- name: abs
Expand Down

0 comments on commit 738c629

Please sign in to comment.