jos
0c87a1a64f
Refactored local variables arg1, arg2 to arg0, arg1 to match the argument index
2018-04-11 13:27:50 +02:00
jos
229ff3d8ff
Fixed #1063 : derivative not working when resolving a variable with unary minus like math.derivative('-x', 'x')
2018-04-11 13:25:44 +02:00
jos
82b41e696a
- Implemented OperatorNode.isUnary and OperatorNode.isBinary.
...
- Explicit checks for number of arguments everywhere working with `OperatorNode` and `FunctionNode`.
- Fixed #1014 : derivative silently ignoring additional arguments.
2018-01-31 11:00:39 +01:00
jos
3f3d50f7a0
Fixed #833 : the constants true, false, null, undefined, NaN, Infinity, and uninitialized are now parsed as ConstantNodes instead of SymbolNodes in the expression parser
2018-01-23 13:55:57 +01:00
jos
924299c42b
Changed ConstantNode(valueStr, valueType) to ConstantNode(value) (breaking change)
2018-01-23 12:08:29 +01:00
Harry Sarson
84c9db3395
uses orginal order of switch statements
2018-01-08 11:18:44 +00:00
Harry Sarson
aaf6536138
ignores additional arguements in subtraction OperatorNode
2018-01-08 11:11:47 +00:00
Harry Sarson
05e6de2fd9
adds constant node checking with 3+ args
2018-01-04 14:25:05 +00:00
Harry Sarson
59e4c4ca97
derivative correctly handles '+' and '*' with three args
2018-01-04 13:42:00 +00:00
jos
967e65cceb
Refactored usage of properties .isNode, .isSymbolNode, etc. into using functions like type.isNode(x) for security
2017-08-12 14:38:03 +02:00
Timothy Lee
8c92deb1c3
Added derivative of abs
2017-05-10 17:24:15 +09:30
jos
20f3af05b3
Fixed markdown urls, updated an example
2017-01-23 21:56:14 +01:00
Jos de Jong
c879acf9d3
Merge pull request #780 from ericman314/differentiation_consistent_api
...
Fixed derivative of exp(x)
2017-01-22 15:44:57 +01:00
ericman314
aab56c8094
Fixed derivative of exp(x)
2017-01-22 07:35:22 -07:00
jos
f4b7855a84
Docs, examples, some fixes
2017-01-22 15:30:18 +01:00
jos
08ed2b4160
Updated docs
2017-01-21 20:45:14 +01:00
jos
91dc47c763
Made ES5 complient again
2017-01-21 20:38:36 +01:00
jos
0ae4dce80b
Updated docs of simplify and derivative
2017-01-21 20:29:10 +01:00
jos
6a61dd6d3c
Implemented option {simplify: boolean} for function derivative
2017-01-21 20:10:10 +01:00
jos
71ae3ea076
Consistent API for both derivative and simplify (dropped transform)
2017-01-20 21:43:40 +01:00
tetslee
23bf1031eb
Improved constant folding in simplify.
2016-11-04 18:02:42 +10:30
tetslee
67b69b49c5
Improvements to simplify(). Also changes to the way simplify and derivative are used.
2016-11-02 16:26:22 +10:30
Favian Contreras
4b929d772a
Added cbrt. Added a small test case and comment as well.
2015-09-21 02:48:30 -07:00
Favian Contreras
48bb64af4e
Added some comments to the derivative file. Added some test cases as well (explicitly test partial derivatives and pure JS usage).
2015-09-19 21:24:56 -07:00
jos
a39d726a18
Merged algebraic_differentiation, fixed issues with function transforms attached to factory functions
2015-07-29 21:24:34 +02:00
Favian Contreras
98040be7e1
Shortened up some of the more verbose test cases for which simplifications are possible. Used config.number on ConstantNodes that I missed on my original commits.
2015-07-25 07:29:17 -07:00
Favian Contreras
6fbe2238cd
Added a test case for nthRoot where the root is variable. Now handles a variable base log, and added a test case. Adjusted the chain rule to be after the switch statement (saves ~1640 bytes and is more modular).
2015-07-21 04:34:06 -07:00
Favian Contreras
2ca8176f1e
Added trigonometric functions, and refactored argument sanity checks. Added 'C^x' and FunctionAssignmentNodes.
2015-06-13 09:40:50 -07:00
Favian Contreras
6feb46ba31
Complete structure of derivitive function. Most operators are complete, with a few functions as well. Still does not handle argument errors well, even though it returns the same it received.
2015-05-31 02:49:36 -07:00