Skip to content

Commit

Permalink
fix: Add missing Math.tanh support and test
Browse files Browse the repository at this point in the history
  • Loading branch information
robertleeplummerjr committed Mar 9, 2020
1 parent 9286f56 commit 54518be
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 12 deletions.
5 changes: 3 additions & 2 deletions dist/gpu-browser-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* GPU Accelerated JavaScript
*
* @version 2.6.9
* @date Sun Feb 16 2020 15:57:16 GMT-0500 (Eastern Standard Time)
* @version 2.6.10
* @date Mon Mar 09 2020 05:45:42 GMT-0400 (Eastern Daylight Time)
*
* @license MIT
* The MIT License
Expand Down Expand Up @@ -2984,6 +2984,7 @@ class FunctionNode {
'sin',
'sqrt',
'tan',
'tanh'
];
return ast.type === 'CallExpression' &&
ast.callee &&
Expand Down
6 changes: 3 additions & 3 deletions dist/gpu-browser-core.min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dist/gpu-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* GPU Accelerated JavaScript
*
* @version 2.6.9
* @date Sun Feb 16 2020 15:57:16 GMT-0500 (Eastern Standard Time)
* @version 2.6.10
* @date Mon Mar 09 2020 05:45:42 GMT-0400 (Eastern Daylight Time)
*
* @license MIT
* The MIT License
Expand Down Expand Up @@ -7418,6 +7418,7 @@ class FunctionNode {
'sin',
'sqrt',
'tan',
'tanh'
];
return ast.type === 'CallExpression' &&
ast.callee &&
Expand Down
6 changes: 3 additions & 3 deletions dist/gpu-browser.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gpu.js",
"version": "2.6.9",
"version": "2.6.10",
"description": "GPU Accelerated JavaScript",
"engines": {
"node": ">=8.0.0"
Expand Down
1 change: 1 addition & 0 deletions src/backend/function-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ class FunctionNode {
'sin',
'sqrt',
'tan',
'tanh'
];
return ast.type === 'CallExpression' &&
ast.callee &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,7 @@ test('Math.sqrt(value)', () => {
test('Math.tan(value)', () => {
assert.equal(run('Math.tan(value)', { argumentTypes: ['Number', 'Number', 'Number'] }), 'Number');
});

test('Math.tanh(value)', () => {
assert.equal(run('Math.tanh(value)', { argumentTypes: ['Number', 'Number', 'Number'] }), 'Number');
});

0 comments on commit 54518be

Please sign in to comment.