Skip to content

Commit

Permalink
feat: add remaining arithmetic functions
Browse files Browse the repository at this point in the history
  • Loading branch information
richtia committed Aug 10, 2023
1 parent 4f42679 commit e468488
Show file tree
Hide file tree
Showing 23 changed files with 1,006 additions and 1 deletion.
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

0 comments on commit e468488

Please sign in to comment.