Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add remaining arithmetic functions #11

Merged
merged 5 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions cases/arithmetic/acos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
function: acos
cases:
- group:
id: basic
description: Basic examples without any special cases
args:
- value: 0.00
type: fp32
result:
value: 1.5707963267948966
type: fp32
- group: basic
args:
- value: 1.0
type: fp64
result:
value: 0.0
type: fp64
- group: basic
args:
- value: -0.0000009
type: fp64
result:
value: 1.5707972267948966
type: fp64
- group: basic
args:
- value: null
type: fp64
result:
value: null
type: fp64
32 changes: 32 additions & 0 deletions cases/arithmetic/acosh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
function: acosh
cases:
- group:
id: basic
description: Basic examples without any special cases
args:
- value: 0.01
type: fp32
result:
value: null
type: fp32
- group: basic
args:
- value: 1.0
type: fp64
result:
value: 0.0
type: fp64
- group: basic
args:
- value: 10.0005
type: fp64
result:
value: 2.9932730967481995
type: fp64
- group: basic
args:
- value: null
type: fp64
result:
value: null
type: fp64
39 changes: 39 additions & 0 deletions cases/arithmetic/asin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
function: asin
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.5707963267948966
type: fp64
- group: basic
args:
- value: 0.009
type: fp64
result:
value: 0.009000121504428887
type: fp64
- group: basic
args:
- value: -0.009
type: fp64
result:
value: -0.009000121504428887
type: fp64
- group: basic
args:
- value: null
type: fp64
result:
value: null
type: fp64
32 changes: 32 additions & 0 deletions cases/arithmetic/asinh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
function: asinh
cases:
- group:
id: basic
description: Basic examples without any special cases
args:
- value: 0.01
type: fp32
result:
value: 0.009999833340832886
type: fp32
- group: basic
args:
- value: 1.0
type: fp64
result:
value: 0.881373587019543
type: fp64
- group: basic
args:
- value: 0.0009
type: fp64
result:
value: 0.0008999998785000443
type: fp64
- group: basic
args:
- value: null
type: fp64
result:
value: null
type: fp64
39 changes: 39 additions & 0 deletions cases/arithmetic/atan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
function: atan
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.7853981633974483
type: fp64
- group: basic
args:
- value: 7.01
type: fp64
result:
value: 1.4290989925795292
type: fp64
- group: basic
args:
- value: -7.01
type: fp64
result:
value: -1.4290989925795292
type: fp64
- group: basic
args:
- value: null
type: fp64
result:
value: null
type: fp64
40 changes: 40 additions & 0 deletions cases/arithmetic/atan2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
function: atan2
cases:
- group:
id: basic
description: Basic examples without any special cases
args:
- value: 0.0
type: fp32
- value: 0.0
type: fp32
result:
value: 0.0
type: fp32
- group: basic
args:
- value: 1.0
type: fp64
- value: 1.0
type: fp64
result:
value: 0.7853981633974483
type: fp64
- group: basic
args:
- value: 0.009
type: fp64
- value: 0.0008
type: fp64
result:
value: 1.482140444927459
type: fp64
- group: basic
args:
- value: null
type: fp64
- value: 0.0008
type: fp64
result:
value: null
type: fp64
39 changes: 39 additions & 0 deletions cases/arithmetic/atanh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
function: atanh
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: inf
type: fp64
- group: basic
args:
- value: 0.009
type: fp64
result:
value: 0.009000243011810481
type: fp64
- group: basic
args:
- value: -0.009
type: fp64
result:
value: -0.009000243011810481
type: fp64
- group: basic
args:
- value: null
type: fp64
result:
value: null
type: fp64
39 changes: 39 additions & 0 deletions cases/arithmetic/cos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
function: cos
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: 0.5403023058681398
type: fp64
- group: basic
args:
- value: 7.0000009
type: fp64
result:
value: 0.7539016630550606
type: fp64
- group: basic
args:
- value: -7.00000095
type: fp64
result:
value: 0.7539016302056953
type: fp64
- group: basic
args:
- value: null
type: fp64
result:
value: null
type: fp64
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/exp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
function: exp
cases:
- group:
id: basic
description: Basic examples without any special cases
args:
- value: 0.25
type: fp32
result:
value: 1.2840254166877414
type: fp32
- group: basic
args:
- value: 0.693
type: fp64
result:
value: 1.9997056605411638
type: fp64
- group: basic
args:
- value: 2.0000007152557373046875
type: fp64
result:
value: 7.3890613839973085
type: fp64
- group: basic
args:
- value: 0.0
type: fp64
result:
value: 1.0
type: fp64
- group: basic
args:
- value: null
type: fp64
result:
value: null
type: fp64
Loading
Loading