Closed MAGNETO903 closed 4 years ago
@MAGNETO903, buildFunction
is getting confused by the parentheses. The quickest fix is to add
if(symbol.fname === '') {
symbol = Symbol.unwrapPARENS(symbol);
}
at the top of the ftext
function here. I'll add it.
You mean at 11152 line?
var ftext = function (symbol, xports) {
xports = xports || [];
...
I tried
var f = nerdamer('acos((-x)^(1/6))').buildFunction();
but i get error:
TypeError: Cannot read property 'toString' of undefined
but if i try
var f = nerdamer('acos((x)^(1/6))').buildFunction();
it's workswhen in expression i have
-x
, nerdamer breaksbut if i set function
root
nerdamer.setFunction('root', ['n', 'x'], 'x^(1/n)');
and try to build function:
nerdamer('acos(root(6, -x))').buildFunction();
it's works too what's wrong?