
js.math.min.js Maven / Gradle / Ivy
"use strict";
/**
* math.js
* https://github.com/josdejong/mathjs
*
* Math.js is an extensive math library for JavaScript and Node.js,
* It features real and complex numbers, units, matrices, a large set of
* mathematical functions, and a flexible expression parser.
*
* @version 4.3.0
* @date 2018-05-21
*
* @license
* Copyright (C) 2013-2018 Jos de Jong
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
/**
* math.js
* https://github.com/josdejong/mathjs
*
* Math.js is an extensive math library for JavaScript and Node.js,
* It features real and complex numbers, units, matrices, a large set of
* mathematical functions, and a flexible expression parser.
*
* @version 4.3.0
* @date 2018-05-21
*
* @license
* Copyright (C) 2013-2018 Jos de Jong
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.math=t():e.math=t()}(this,function(){return function(r){var n={};function i(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}return i.m=r,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=560)}([function(e,t,r){e.exports=function t(e,r,n){return e&&"function"==typeof e.map?e.map(function(e){return t(e,r,n)}):r(e)}},function(e,t,r){t.name="matrix",t.factory=function(n,e,t,r){var i=r("matrix",{"":function(){return a([])},string:function(e){return a([],e)},"string, string":function(e,t){return a([],e,t)},Array:function(e){return a(e)},Matrix:function(e){return a(e,e.storage())},"Array | Matrix, string":a,"Array | Matrix, string, string":a});return i.toTex={0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},i;function a(e,t,r){return new(n.Matrix.storage(t||"default"))(e,r)}}},function(e,o,t){var n=t(3),i=t(9),u=t(11),r=t(61);o.size=function(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t},o.validate=function(e,t){if(0==t.length){if(Array.isArray(e))throw new u(e.length,0)}else!function e(t,r,n){var i,a=t.length;if(a!=r[n])throw new u(a,r[n]);if(n")}(e,t,0)},o.validateIndex=function(e,t){if(!n.isNumber(e)||!n.isInteger(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||"number"==typeof t&&t<=e)throw new r(e,t)},o.resize=function(e,t,r){if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(0===t.length)throw new Error("Resizing to scalar is not supported");return t.forEach(function(e){if(!n.isNumber(e)||!n.isInteger(e)||e<0)throw new TypeError("Invalid size, must contain positive integers (size: "+i.format(t)+")")}),function e(t,r,n,i){var a;var o;var s=t.length;var u=r[n];var c=Math.min(s,u);t.length=u;if(n=i)return p.toExponential(e,t);var o=t?p.roundDigits(a,t):a,s=o.coefficients,u=o.exponent;s.lengtht&&5<=n.splice(t,n.length-t)[0]){var i=t-1;for(n[i]++;10===n[i];)n.pop(),0===i&&(n.unshift(0),r.exponent++,i++),n[--i]++}return r},p.digits=function(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length},p.DBL_EPSILON=Number.EPSILON||2220446049250313e-31,p.nearlyEqual=function(e,t,r){if(null==r)return e==t;if(e==t)return!0;if(isNaN(e)||isNaN(t))return!1;if(isFinite(e)&&isFinite(t)){var n=Math.abs(e-t);return n>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},r.defaultTemplate="\\mathrm{${name}}\\left(${args}\\right)";var i={deg:"^\\circ"};r.escape=function(e){return n(e,{preserveFormatting:!0})},r.toSymbol=function(e,t){return(t=void 0!==t&&t)?i.hasOwnProperty(e)?i[e]:"\\mathrm{"+r.escape(e)+"}":r.symbols.hasOwnProperty(e)?r.symbols[e]:r.escape(e)}},function(e,a,t){var n=t(90);a.clone=function t(e){var r=typeof e;if("number"===r||"string"===r||"boolean"===r||null==e)return e;if("function"==typeof e.clone)return e.clone();if(Array.isArray(e))return e.map(function(e){return t(e)});if(e instanceof Number)return new Number(e.valueOf());if(e instanceof String)return new String(e.valueOf());if(e instanceof Boolean)return new Boolean(e.valueOf());if(e instanceof Date)return new Date(e.valueOf());if(n(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return a.map(e,t)},a.map=function(e,t){var r={};for(var n in e)a.hasOwnProperty(e,n)&&(r[n]=t(e[n]));return r},a.extend=function(e,t){for(var r in t)a.hasOwnProperty(t,r)&&(e[r]=t[r]);return e},a.deepExtend=function e(t,r){if(Array.isArray(r))throw new TypeError("Arrays are not supported by deepExtend");for(var n in r)if(a.hasOwnProperty(r,n))if(r[n]&&r[n].constructor===Object)void 0===t[n]&&(t[n]={}),t[n].constructor===Object?e(t[n],r[n]):t[n]=r[n];else{if(Array.isArray(r[n]))throw new TypeError("Arrays are not supported by deepExtend");t[n]=r[n]}return t},a.deepEqual=function(e,t){var r,n,i;if(Array.isArray(e)){if(!Array.isArray(t))return!1;if(e.length!=t.length)return!1;for(n=0,i=e.length;n/g,">")}},function(e,t,r){var a=r(3).nearlyEqual,o=r(44);t.factory=function(e,r,t,n){var i=n("equalScalar",{"boolean, boolean":function(e,t){return e===t},"number, number":function(e,t){return e===t||a(e,t,r.epsilon)},"BigNumber, BigNumber":function(e,t){return e.eq(t)||o(e,t,r.epsilon)},"Fraction, Fraction":function(e,t){return e.equals(t)},"Complex, Complex":function(e,t){return e.equals(t)},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return i(e.value,t.value)}});return i}},function(e,t,r){function n(e,t,r){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=r,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=(new Error).stack}(n.prototype=new RangeError).constructor=RangeError,n.prototype.name="DimensionError",n.prototype.isDimensionError=!0,e.exports=n},function(e,t,o){t.factory=function(e,t,r,n){var i=r(o(21)),a=n("divide",{"number, number":function(e,t){return e/t},"Complex, Complex":function(e,t){return e.div(t)},"BigNumber, BigNumber":function(e,t){return e.div(t)},"Fraction, Fraction":function(e,t){return e.div(t)},"Unit, number | Fraction | BigNumber":function(e,t){var r=e.clone();return r.value=a(null===r.value?r._normalize(1):r.value,t),r},"number | Fraction | BigNumber, Unit":function(e,t){var r=t.pow(-1);return r.value=i(null===r.value?r._normalize(1):r.value,e),r},"Unit, Unit":function(e,t){return e.divide(t)}});return a}},function(e,t,m){var h=m(5).extend;t.name="add",t.factory=function(e,t,r,n){var i=r(m(1)),a=r(m(20)),o=m(4),s=r(m(34)),u=r(m(88)),c=r(m(43)),f=r(m(7)),l=r(m(6)),p=n("add",h({"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,a)},"DenseMatrix, SparseMatrix":function(e,t){return s(e,t,a,!1)},"SparseMatrix, DenseMatrix":function(e,t){return s(t,e,a,!0)},"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,a)},"Array, Array":function(e,t){return p(i(e),i(t)).valueOf()},"Array, Matrix":function(e,t){return p(i(e),t)},"Matrix, Array":function(e,t){return p(e,i(t))},"DenseMatrix, any":function(e,t){return l(e,t,a,!1)},"SparseMatrix, any":function(e,t){return c(e,t,a,!1)},"any, DenseMatrix":function(e,t){return l(t,e,a,!0)},"any, SparseMatrix":function(e,t){return c(t,e,a,!0)},"Array, any":function(e,t){return l(i(e),t,a,!1).valueOf()},"any, Array":function(e,t){return l(i(t),e,a,!0).valueOf()},"any, any":a,"any, any, ...any":function(e,t,r){for(var n=p(e,t),i=0;io)for(u=o-1,a=s.length;ui.re?1:n.rei.im?1:n.imt.length?1:e.length":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},N={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},M={true:!0,false:!1,null:null,undefined:void 0},E=["NaN","Infinity"],A={},O="",S="",_=0,T="",C="",z=w.NULL,B=0,I=null,P=[];function R(){_++,T=O.charAt(_)}function U(){return O.charAt(_-1)}function k(){return O.charAt(_+1)}function q(){P.push({token_type:z,token:C,comment:S,index:_,c:T})}function D(){var e=P.pop();z=e.token_type,C=e.token,S=e.comment,_=e.index,T=e.c}function L(){for(z=w.NULL,S=C="";x.isWhitespace(T,B);)R();if("#"===T)for(;"\n"!==T&&""!==T;)S+=T,R();if(""!==T){if("\n"===T&&!B)return z=w.DELIMITER,C=T,void R();var e=T+k(),t=e+O.charAt(_+2);if(3===t.length&&b[t])return z=w.DELIMITER,C=t,R(),R(),void R();if(2===e.length&&b[e])return z=w.DELIMITER,C=e,R(),void R();if(b[T])return z=w.DELIMITER,C=T,void R();if(x.isDigitDot(T)){if(z=w.NUMBER,"."===T)C+=T,R(),x.isDigit(T)||(z=w.DELIMITER);else{for(;x.isDigit(T);)C+=T,R();x.isDecimalMark(T,k())&&(C+=T,R())}for(;x.isDigit(T);)C+=T,R();if(e=k(),"E"===T||"e"===T)if(x.isDigit(e)||"-"===e||"+"===e){if(C+=T,R(),"+"!==T&&"-"!==T||(C+=T,R()),!x.isDigit(T))throw fe('Digit expected, got "'+T+'"');for(;x.isDigit(T);)C+=T,R();if(x.isDecimalMark(T,k()))throw fe('Digit expected, got "'+T+'"')}else if("."===e)throw R(),fe('Digit expected, got "'+T+'"')}else{if(!x.isAlpha(T,U(),k())){for(z=w.UNKNOWN;""!==T;)C+=T,R();throw fe('Syntax error in part "'+C+'"')}for(;x.isAlpha(T,U(),k())||x.isDigit(T);)C+=T,R();z=N.hasOwnProperty(C)?w.DELIMITER:w.SYMBOL}}else z=w.DELIMITER}function F(){for(;L(),"\n"===C;);}function j(){B++}function $(){B--}function H(){_=0,T=O.charAt(0),B=0,I=null,L();var e=function(){var e,t,r=[];for(""!==C&&"\n"!==C&&";"!==C&&((e=G()).comment=S);"\n"===C||";"===C;)0===r.length&&e&&(t=";"!==C,r.push({node:e,visible:t})),L(),"\n"!==C&&";"!==C&&""!==C&&((e=G()).comment=S,t=";"!==C,r.push({node:e,visible:t}));return 0":"larger","<=":"smallerEq",">=":"largerEq"};t.hasOwnProperty(C);)n=t[r=C],F(),i=[e,Q()],e=new d(r,n,i);return e}function Q(){var e,t,r,n,i;for(e=K(),t={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};t.hasOwnProperty(C);)n=t[r=C],F(),i=[e,K()],e=new d(r,n,i);return e}function K(){var e,t,r,n,i;for(e=ee(),t={to:"to",in:"to"};t.hasOwnProperty(C);)n=t[r=C],F(),"in"===r&&""===C?e=new d("*","multiply",[e,new y("in")],!0):(i=[e,ee()],e=new d(r,n,i));return e}function ee(){var e,t=[];if(e=":"===C?new l(1):te(),":"===C&&I!==B){for(t.push(e);":"===C&&t.length<3;)F(),")"===C||"]"===C||","===C||""===C?t.push(new y("end")):t.push(te());e=3===t.length?new r(t[0],t[2],t[1]):new r(t[0],t[1])}return e}function te(){var e,t,r,n,i;for(e=re(),t={"+":"add","-":"subtract"};t.hasOwnProperty(C);)n=t[r=C],F(),i=[e,re()],e=new d(r,n,i);return e}function re(){var e,t,r,n,i;for(t=e=ne(),r={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide","%":"mod",mod:"mod"};r.hasOwnProperty(C);)i=r[n=C],F(),t=ne(),e=new d(n,i,[e,t]);return e}function ne(){var e,t;for(t=e=ie();z===w.SYMBOL||"in"===C&&a.isConstantNode(e)||!(z!==w.NUMBER||a.isConstantNode(t)||a.isOperatorNode(t)&&"!"!==t.op)||"("===C;)t=ie(),e=new d("*","multiply",[e,t],!0);return e}function ie(){var e,t;for(t=e=ae();"/"===C&&a.isConstantNode(t);){if(q(),F(),z!==w.NUMBER){D();break}if(q(),F(),z!==w.SYMBOL&&"("!==C){D(),D();break}D(),P.pop(),t=ae(),e=new d("/","divide",[e,t])}return e}function ae(){var e,t,r,n,i,a,o,s={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return s.hasOwnProperty(C)?(r=s[C],e=C,F(),t=[ae()],new d(e,r,t)):(n=function(){var e,t,r,n;for(e=function(){var e,t,r=[];if(z===w.SYMBOL&&A.hasOwnProperty(C)){var n=A[C];if(L(),"("===C){if(r=[],j(),L(),")"!==C)for(r.push(G());","===C;)L(),r.push(G());if(")"!==C)throw fe("Parenthesis ) expected");$(),L()}return new n(r)}return z===w.SYMBOL||z===w.DELIMITER&&C in N?(e=C,L(),oe(M.hasOwnProperty(e)?new l(M[e]):-1!==E.indexOf(e)?new l(c(e)):new y(e))):'"'===C?(t=se(),oe(new l(t))):function(){var e,t,r,n;if("["===C){if(j(),L(),"]"!==C){var i=ue();if(";"===C){for(r=1,t=[i];";"===C;)L(),t[r]=ue(),r++;if("]"!==C)throw fe("End of matrix ] expected");$(),L(),n=t[0].items.length;for(var a=1;a>=1,i=s(i,i);return n}function m(e,t){return n(p(e.valueOf(),t))}return f.toTex={2:"\\left(${args[0]}\\right)"+r.operators.pow+"{${args[1]}}"},f}},function(e,t,p){var m=p(3).nearlyEqual,h=p(44);t.name="smaller",t.factory=function(e,r,t,n){var i=t(p(1)),a=t(p(19)),o=t(p(28)),s=t(p(18)),u=t(p(7)),c=t(p(6)),f=p(4),l=n("smaller",{"boolean, boolean":function(e,t){return e'+t+"":"i"==t?''+t+"":"Infinity"==t?''+t+"":"NaN"==t?''+t+"":"null"==t?''+t+"":"undefined"==t?''+t+"":''+t+""},a.prototype.toJSON=function(){return{mathjs:"SymbolNode",name:this.name}},a.fromJSON=function(e){return new a(e.name)},a.prototype._toTex=function(e){var t=!1;void 0===n[this.name]&&s(this.name)&&(t=!0);var r=c.toSymbol(this.name,t);return"\\"===r[0]?r:" "+r},a}},function(e,t,r){t.name="typeof",t.factory=function(r,e,t,n){var i=n("_typeof",{any:function(e){var t=typeof e;return"object"===t?null===e?"null":Array.isArray(e)?"Array":e instanceof Date?"Date":e instanceof RegExp?"RegExp":e instanceof Boolean?"boolean":e instanceof Number?"number":e instanceof String?"string":r.isBigNumber(e)?"BigNumber":r.isComplex(e)?"Complex":r.isFraction(e)?"Fraction":r.isMatrix(e)?"Matrix":r.isUnit(e)?"Unit":r.isIndex(e)?"Index":r.isRange(e)?"Range":r.isResultSet(e)?"ResultSet":r.isNode(e)?e.type:r.isChain(e)?"Chain":r.isHelp(e)?"Help":"Object":"function"===t?"Function":t}});return i.toTex=void 0,i}},function(e,t,m){t.name="equal",t.factory=function(e,t,r,n){var i=r(m(1)),a=r(m(10)),o=r(m(19)),s=r(m(28)),u=r(m(18)),c=r(m(7)),f=r(m(6)),l=m(4),p=n("equal",{"any, any":function(e,t){return null===e?null===t:null===t?null===e:void 0===e?void 0===t:void 0===t?void 0===e:a(e,t)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,a)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,a,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,a,!1)},"DenseMatrix, DenseMatrix":function(e,t){return c(e,t,a)},"Array, Array":function(e,t){return p(i(e),i(t)).valueOf()},"Array, Matrix":function(e,t){return p(i(e),t)},"Matrix, Array":function(e,t){return p(e,i(t))},"SparseMatrix, any":function(e,t){return u(e,t,a,!1)},"DenseMatrix, any":function(e,t){return f(e,t,a,!1)},"any, SparseMatrix":function(e,t){return u(t,e,a,!0)},"any, DenseMatrix":function(e,t){return f(t,e,a,!0)},"Array, any":function(e,t){return f(i(e),t,a,!1).valueOf()},"any, Array":function(e,t){return f(i(t),e,a,!0).valueOf()}});return p.toTex={2:"\\left(${args[0]}"+l.operators.equal+"${args[1]}\\right)"},p}},function(e,t,s){var l=s(2),p=s(3).isInteger;t.name="eye",t.factory=function(f,r,e,t){var n=e(s(1)),i=t("eye",{"":function(){return"Matrix"===r.matrix?n([]):[]},string:function(e){return n(e)},"number | BigNumber":function(e){return o(e,e,"Matrix"===r.matrix?"default":void 0)},"number | BigNumber, string":function(e,t){return o(e,e,t)},"number | BigNumber, number | BigNumber":function(e,t){return o(e,t,"Matrix"===r.matrix?"default":void 0)},"number | BigNumber, number | BigNumber, string":function(e,t,r){return o(e,t,r)},Array:function(e){return a(e)},"Array, string":function(e,t){return a(e,t)},Matrix:function(e){return a(e.valueOf(),e.storage())},"Matrix, string":function(e,t){return a(e.valueOf(),t)}});return i.toTex=void 0,i;function a(e,t){switch(e.length){case 0:return t?n(t):[];case 1:return o(e[0],e[0],t);case 2:return o(e[0],e[1],t);default:throw new Error("Vector containing two values expected")}}function o(e,t,r){var n=f.isBigNumber(e)||f.isBigNumber(t)?f.BigNumber:null;if(f.isBigNumber(e)&&(e=e.toNumber()),f.isBigNumber(t)&&(t=t.toNumber()),!p(e)||e<1)throw new Error("Parameters in function eye must be positive integers");if(!p(t)||t<1)throw new Error("Parameters in function eye must be positive integers");var i=n?new f.BigNumber(1):1,a=n?new n(0):0,o=[e,t];if(r)return f.Matrix.storage(r).diagonal(o,i,0,a);for(var s=l.resize([],o,a),u=e");var c=t.max().map(function(e){return e+1});l(e,c,n);var f=a.length;!function r(n,i,a,o,s){var e=s===o-1,t=i.dimension(s);e?t.forEach(function(e,t){N(e),n[e]=a[t[0]]}):t.forEach(function(e,t){N(e),r(n[e],i,a[t[0]],o,s+1)})}(e._data,t,r,f,0)}return e}(this,e,t,r);default:throw new SyntaxError("Wrong number of arguments")}},g.prototype.get=function(e){if(!y(e))throw new TypeError("Array expected");if(e.length!=this._size.length)throw new p(e.length,this._size.length);for(var t=0;tn[a]&&(n[a]=t[a],i=!0);i&&s(e,n,r)}return g.prototype.reshape=function(e,t){var r=t?this.clone():this;return r._data=v.reshape(r._data,e),r._size=e.slice(0),r},g.prototype.clone=function(){return new g({data:m.clone(this._data),size:m.clone(this._size),datatype:this._datatype})},g.prototype.size=function(){return this._size.slice(0)},g.prototype.map=function(t){var n=this,i=function(e,r){return y(e)?e.map(function(e,t){return i(e,r.concat(t))}):t(e,r,n)};return new g({data:i(this._data,[]),size:m.clone(this._size),datatype:this._datatype})},g.prototype.forEach=function(t){var n=this,i=function(e,r){y(e)?e.forEach(function(e,t){i(e,r.concat(t))}):t(e,r,n)};i(this._data,[])},g.prototype.toArray=function(){return m.clone(this._data)},g.prototype.valueOf=function(){return this._data},g.prototype.format=function(e){return a.format(this._data,e)},g.prototype.toString=function(){return a.format(this._data)},g.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},g.prototype.diagonal=function(e){if(e){if(h.isBigNumber(e)&&(e=e.toNumber()),!x(e)||!w(e))throw new TypeError("The parameter k must be an integer number")}else e=0;for(var t=0('+o+')'),"right"===a?''+f(this.op)+""+o:''+f(this.op)+""+o}if(2==n.length){var s=n[0].toHTML(r),u=n[1].toHTML(r);return i[0]&&(s='('+s+')'),i[1]&&(u='('+u+')'),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"==t?s+''+u:s+''+f(this.op)+""+u}if(2('+e+')'),e});return this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===t?c.join(''):c.join(''+f(this.op)+"")}return''+f(this.fn)+'('+c.join(',')+')'},a.prototype._toTex=function(r){var e=r&&r.parenthesis?r.parenthesis:"keep",t=r&&r.implicit?r.implicit:"hide",n=this.args,i=m(this,e,t,n,!0),a=h.operators[this.fn];if(a=void 0===a?this.op:a,1===n.length){var o=x.getAssociativity(this,e),s=n[0].toTex(r);return i[0]&&(s="\\left("+s+"\\right)"),"right"===o?a+s:s+a}if(2===n.length){var u=n[0],c=u.toTex(r);i[0]&&(c="\\left("+c+"\\right)");var f,l=n[1].toTex(r);switch(i[1]&&(l="\\left("+l+"\\right)"),f="keep"===e?u.getIdentifier():u.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return a+"{"+c+"}{"+l+"}";case"OperatorNode:pow":switch(c="{"+c+"}",l="{"+l+"}",f){case"ConditionalNode":case"OperatorNode:divide":c="\\left("+c+"\\right)"}case"OperatorNode:multiply":if(this.implicit&&"hide"===t)return c+"~"+l}return c+a+l}if(2'+t+"";case"string":return''+t+"";case"boolean":return''+t+"";case"null":return''+t+"";case"undefined":return''+t+"";default:return''+t+""}},o.prototype.toJSON=function(){return{mathjs:"ConstantNode",value:this.value}},o.fromJSON=function(e){return new o(e.value)},o.prototype._toTex=function(e){var t=this._toString(e);switch(a(this.value)){case"string":return"\\mathtt{"+c(t)+"}";case"number":case"BigNumber":var r=t.toLowerCase().indexOf("e");return-1!==r?t.substring(0,r)+"\\cdot10^{"+t.substring(r+1)+"}":t;case"Fraction":return this.value.toLatex();default:return t}},o}},function(e,t,r){var f=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{associativity:"left",associativeWith:[]}},{"OperatorNode:and":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{associativity:"left",associativeWith:[]},"OperatorNode:unequal":{associativity:"left",associativeWith:[]},"OperatorNode:smaller":{associativity:"left",associativeWith:[]},"OperatorNode:larger":{associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{associativity:"left",associativeWith:[]}},{"OperatorNode:to":{associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{associativity:"left",associativeWith:[]},"OperatorNode:mod":{associativity:"left",associativeWith:[]}},{"OperatorNode:unaryPlus":{associativity:"right"},"OperatorNode:unaryMinus":{associativity:"right"},"OperatorNode:bitNot":{associativity:"right"},"OperatorNode:not":{associativity:"right"}},{"OperatorNode:pow":{associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{associativity:"left"}},{"OperatorNode:transpose":{associativity:"left"}}];function l(e,t){var r=e;"keep"!==t&&(r=e.getContent());for(var n=r.getIdentifier(),i=0;i=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=(new Error).stack}(n.prototype=new RangeError).constructor=RangeError,n.prototype.name="IndexError",n.prototype.isIndexError=!0,e.exports=n},function(e,t,r){var a=r(3).isInteger;function u(e){return e.isInteger()&&e.gte(0)}t.name="combinations",t.factory=function(s,e,t,r){var n=r("combinations",{"number, number":function(e,t){var r,n,i;if(!a(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!a(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(e'+l(this.fn)+'('+e.join(',')+')'};var u=h.prototype.toTex;return h.prototype.toTex=function(e){var t;return e&&"object"==typeof e.handler&&p(e.handler,this.name)&&(t=e.handler[this.name](this,e)),void 0!==t?t:u.call(this,e)},h.prototype._toTex=function(t){var e,r,n=this.args.map(function(e){return e.toTex(t)});switch(!i[this.name]||"function"!=typeof i[this.name].toTex&&"object"!=typeof i[this.name].toTex&&"string"!=typeof i[this.name].toTex||(e=i[this.name].toTex),typeof e){case"function":r=e(this,t);break;case"string":r=s(e,this,t);break;case"object":switch(typeof e[n.length]){case"function":r=e[n.length](this,t);break;case"string":r=s(e[n.length],this,t)}}return void 0!==r?r:s(f.defaultTemplate,this,t)},h.prototype.getIdentifier=function(){return this.type+":"+this.name},h}},function(e,t,o){t.name="ParenthesisNode",t.path="expression.node",t.factory=function(t,e,r,n){var i=r(o(14));function a(e){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(!t.isNode(e))throw new TypeError('Node expected for parameter "content"');this.content=e}return(a.prototype=new i).type="ParenthesisNode",a.prototype.isParenthesisNode=!0,a.prototype._compile=function(e,t){return this.content._compile(e,t)},a.prototype.getContent=function(){return this.content.getContent()},a.prototype.forEach=function(e){e(this.content,"content",this)},a.prototype.map=function(e){return new a(e(this.content,"content",this))},a.prototype.clone=function(){return new a(this.content)},a.prototype._toString=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"("+this.content.toString(e)+")":this.content.toString(e)},a.prototype.toJSON=function(){return{mathjs:"ParenthesisNode",content:this.content}},a.fromJSON=function(e){return new a(e.content)},a.prototype.toHTML=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?'('+this.content.toHTML(e)+')':this.content.toHTML(e)},a.prototype._toTex=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"\\left("+this.content.toTex(e)+"\\right)":this.content.toTex(e)},a}},function(e,t,n){var q=n(11);t.name="algorithm05",t.factory=function(e,t,r,R){var U=r(n(10)),k=e.SparseMatrix;return function(e,t,r){var n=e._values,i=e._index,a=e._ptr,o=e._size,s=e._datatype,u=t._values,c=t._index,f=t._ptr,l=t._size,p=t._datatype;if(o.length!==l.length)throw new q(o.length,l.length);if(o[0]!==l[0]||o[1]!==l[1])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+l+")");var m,h=o[0],d=o[1],g=U,v=0,y=r;"string"==typeof s&&s===p&&(m=s,g=R.find(U,[m,m]),v=R.convert(0,m),y=R.find(r,[m,m]));var x,w,b,N,M=n&&u?[]:void 0,E=[],A=[],O=new k({values:M,index:E,ptr:A,size:[h,d],datatype:m}),S=M?[]:void 0,_=M?[]:void 0,T=[],C=[];for(w=0;w=e.length)throw new Error("k out of bounds");for(var n=0,i=e.length-1;nu)for(o-=u;o--;s+="0");else o>1,c[l]&=1)}return c.reverse()}e.exports=function(e,t,r){var n,i,a,o,s,u=e.constructor,c=+(e.s<0),f=+(t.s<0);if(c){n=w(x(e));for(var l=0;l");if(2!==o.length)throw SyntaxError("Could not parse rule: "+i);i={l:o[0],r:o[1]};case"object":if(n={l:M(c(i.l)),r:M(c(i.r))},i.context&&(n.evaluate=i.context),i.evaluate&&(n.evaluate=c(i.evaluate)),y(n.l)){var s=N(n.l),u=new g("_p"+A++);n.expanded={},n.expanded.l=s([n.l.clone(),u]),x(n.expanded.l),w(n.expanded.l),n.expanded.r=s([n.r,u])}break;case"function":n=i;break;default:throw TypeError("Unsupported type of rule: "+a)}t.push(n)}return t}(t);for(var n,i={},a=(n=M(n=u(e,r))).toString({parenthesis:"all"});!i[a];){i[a]=!0;for(var o=A=0;o=n.length)throw new o(t,n.length);return a(e)?e.create(s(e.valueOf(),t,r)):s(e,t,r)}},function(e,t,c){var f=c(37),l=c(83),p=c(67);t.name="max",t.factory=function(e,t,r,n){var i=r(c(33)),a=r(c(31)),o=n("max",{"Array | Matrix":u,"Array | Matrix, number | BigNumber":function(e,t){return l(e,t.valueOf(),s)},"...":function(e){if(p(e))throw new TypeError("Scalar values expected in function max");return u(e)}});return o.toTex="\\max\\left(${args}\\right)",o;function s(e,t){try{return i(e,t)?e:t}catch(e){throw a(e,"max",t)}}function u(e){var r=void 0;if(f(e,function(t){try{(void 0===r||i(t,r))&&(r=t)}catch(e){throw a(e,"max",t)}}),void 0===r)throw new Error("Cannot calculate max of an empty array");return r}}},function(e,t,r){t.factory=function(s,e,t,r){return function(e,t,r){var n=e.filter(function(e){return s.isSymbolNode(e)&&!(e.name in t)&&!(e.name in r)})[0];if(!n)throw new Error('No undefined variable found in inline expression "'+e+'"');var i=n.name,a=Object.create(r),o=e.compile();return function(e){return a[i]=e,o.eval(a)}}}},function(e,t,u){var c=u(2).map,f=u(9).escape;t.name="IndexNode",t.path="expression.node",t.factory=function(n,e,t,r){var i=t(u(14)),a=t(u(145)),o=Array.isArray;function s(e,t){if(!(this instanceof s))throw new SyntaxError("Constructor must be called with the new operator");if(this.dimensions=e,this.dotNotation=t||!1,!o(e)||!e.every(n.isNode))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties");var r=function(){throw new Error("Property `IndexNode.object` is deprecated, use `IndexNode.fn` instead")};Object.defineProperty(this,"object",{get:r,set:r})}function l(e,t,r){return new a(n.isBigNumber(e)?e.toNumber():e,n.isBigNumber(t)?t.toNumber():t,n.isBigNumber(r)?r.toNumber():r)}return(s.prototype=new i).type="IndexNode",s.prototype.isIndexNode=!0,s.prototype._compile=function(f,r){var i=c(this.dimensions,function(e,a){if(n.isRangeNode(e)){if(e.needsEnd()){(t=Object.create(r)).end=!0;var o=e.start._compile(f,t),s=e.end._compile(f,t),u=e.step?e.step._compile(f,t):function(){return 1};return function(e,t,r){var n=f.size(r).valueOf(),i=Object.create(t);return i.end=n[a],l(o(e,i,r),s(e,i,r),u(e,i,r))}}return o=e.start._compile(f,r),s=e.end._compile(f,r),u=e.step?e.step._compile(f,r):function(){return 1},function(e,t,r){return l(o(e,t,r),s(e,t,r),u(e,t,r))}}if(n.isSymbolNode(e)&&"end"===e.name){var t;(t=Object.create(r)).end=!0;var c=e._compile(f,t);return function(e,t,r){var n=f.size(r).valueOf(),i=Object.create(t);return i.end=n[a],c(e,i,r)}}return c=e._compile(f,r),function(e,t,r){return c(e,t,r)}});return function(t,r,n){var e=c(i,function(e){return e(t,r,n)});return f.index.apply(f,e)}},s.prototype.forEach=function(e){for(var t=0;t.'+f(this.getObjectProperty())+"":'['+t.join(',')+']'},s.prototype._toTex=function(t){var e=this.dimensions.map(function(e){return e.toTex(t)});return this.dotNotation?"."+this.getObjectProperty():"_{"+e.join(",")+"}"},s}},function(e,t,r){var a=r(0);t.name="number",t.factory=function(e,t,r,n){var i=n("number",{"":function(){return 0},number:function(e){return e},string:function(e){var t=Number(e);if(isNaN(t))throw new SyntaxError('String "'+e+'" is no valid number');return t},BigNumber:function(e){return e.toNumber()},Fraction:function(e){return e.valueOf()},Unit:function(e){throw new Error("Second argument with valueless unit expected")},null:function(e){return 0},"Unit, string | Unit":function(e,t){return e.toNumber(t)},"Array | Matrix":function(e){return a(e,i)}});return i.toTex={0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},i}},function(e,t,n){var k=n(11);t.name="algorithm04",t.factory=function(e,t,r,P){var R=r(n(10)),U=e.SparseMatrix;return function(e,t,r){var n=e._values,i=e._index,a=e._ptr,o=e._size,s=e._datatype,u=t._values,c=t._index,f=t._ptr,l=t._size,p=t._datatype;if(o.length!==l.length)throw new k(o.length,l.length);if(o[0]!==l[0]||o[1]!==l[1])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+l+")");var m,h=o[0],d=o[1],g=R,v=0,y=r;"string"==typeof s&&s===p&&(m=s,g=P.find(R,[m,m]),v=P.convert(0,m),y=P.find(r,[m,m]));var x,w,b,N,M,E=n&&u?[]:void 0,A=[],O=[],S=new U({values:E,index:A,ptr:O,size:[h,d],datatype:m}),_=n&&u?[]:void 0,T=n&&u?[]:void 0,C=[],z=[];for(w=0;w('+n+')'),t=n,this.step){var i=this.step.toHTML(e);r.step&&(i='('+i+')'),t+=':'+i}var a=this.end.toHTML(e);return r.end&&(a='('+a+')'),t+=':'+a},a.prototype._toTex=function(e){var t=o(this,e&&e.parenthesis?e.parenthesis:"keep"),r=this.start.toTex(e);if(t.start&&(r="\\left("+r+"\\right)"),this.step){var n=this.step.toTex(e);t.step&&(n="\\left("+n+"\\right)"),r+=":"+n}var i=this.end.toTex(e);return t.end&&(i="\\left("+i+"\\right)"),r+=":"+i},a}},function(e,t,o){var s=o(9).stringify,u=o(9).escape,c=o(15).isSafeProperty,f=o(5).hasOwnProperty;t.name="ObjectNode",t.path="expression.node",t.factory=function(r,e,t,n){var i=t(o(14));function a(t){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(this.properties=t||{},t&&("object"!=typeof t||!Object.keys(t).every(function(e){return r.isNode(t[e])})))throw new TypeError("Object containing Nodes expected")}return(a.prototype=new i).type="ObjectNode",a.prototype.isObjectNode=!0,a.prototype._compile=function(e,t){var a={};for(var r in this.properties)if(f(this.properties,r)){var n=s(r),i=JSON.parse(n);if(!c(this.properties,i))throw new Error('No access to property "'+i+'"');a[i]=this.properties[r]._compile(e,t)}return function(e,t,r){var n={};for(var i in a)f(a,i)&&(n[i]=a[i](e,t,r));return n}},a.prototype.forEach=function(e){for(var t in this.properties)this.properties.hasOwnProperty(t)&&e(this.properties[t],"properties["+s(t)+"]",this)},a.prototype.map=function(e){var t={};for(var r in this.properties)this.properties.hasOwnProperty(r)&&(t[r]=this._ifNode(e(this.properties[r],"properties["+s(r)+"]",this)));return new a(t)},a.prototype.clone=function(){var e={};for(var t in this.properties)this.properties.hasOwnProperty(t)&&(e[t]=this.properties[t]);return new a(e)},a.prototype._toString=function(e){var t=[];for(var r in this.properties)this.properties.hasOwnProperty(r)&&t.push(s(r)+": "+this.properties[r].toString(e));return"{"+t.join(", ")+"}"},a.prototype.toJSON=function(){return{mathjs:"ObjectNode",properties:this.properties}},a.fromJSON=function(e){return new a(e.properties)},a.prototype.toHTML=function(e){var t=[];for(var r in this.properties)this.properties.hasOwnProperty(r)&&t.push(''+u(r)+':'+this.properties[r].toHTML(e));return'{'+t.join(',')+'}'},a.prototype._toTex=function(e){var t=[];for(var r in this.properties)this.properties.hasOwnProperty(r)&&t.push("\\mathbf{"+r+":} & "+this.properties[r].toTex(e)+"\\\\");return"\\left\\{\\begin{array}{ll}"+t.join("\n")+"\\end{array}\\right\\}"},a}},function(e,t,o){var s=o(134),u=o(9).escape,l=o(2).forEach,p=o(2).join,c=o(4),m=o(59),h=o(15).setSafeProperty;t.name="FunctionAssignmentNode",t.path="expression.node",t.factory=function(n,e,t,f){var r=t(o(14));function i(e,t,r){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if("string"!=typeof e)throw new TypeError('String expected for parameter "name"');if(!Array.isArray(t))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!n.isNode(r))throw new TypeError('Node expected for parameter "expr"');if(e in s)throw new Error('Illegal function name, "'+e+'" is a reserved keyword');this.name=e,this.params=t.map(function(e){return e&&e.name||e}),this.types=t.map(function(e){return e&&e.type||"any"}),this.expr=r}function a(e,t){var r=m.getPrecedence(e,t),n=m.getPrecedence(e.expr,t);return"all"===t||null!==n&&n<=r}return(i.prototype=new r).type="FunctionAssignmentNode",i.prototype.isFunctionAssignmentNode=!0,i.prototype._compile=function(e,t){var r=Object.create(t);l(this.params,function(e){r[e]=!0});var a=this.expr._compile(e,r),o=this.name,s=this.params,u=p(this.types,","),c=o+"("+p(this.params,", ")+")";return function(r,n,i){var e={};e[u]=function(){for(var e=Object.create(n),t=0;t'+u(this.params[n])+"");var i=this.expr.toHTML(e);return a(this,t)&&(i='('+i+')'),''+u(this.name)+'('+r.join(',')+')='+i},i.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=this.expr.toTex(e);return a(this,t)&&(r="\\left("+r+"\\right)"),"\\mathrm{"+this.name+"}\\left("+this.params.map(c.toSymbol).join(",")+"\\right):="+r},i}},function(e,t,a){var c=a(59);t.name="ConditionalNode",t.path="expression.node",t.factory=function(o,e,t,r){var n=t(a(14)),s=t(a(49));function i(e,t,r){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(!o.isNode(e))throw new TypeError("Parameter condition must be a Node");if(!o.isNode(t))throw new TypeError("Parameter trueExpr must be a Node");if(!o.isNode(r))throw new TypeError("Parameter falseExpr must be a Node");this.condition=e,this.trueExpr=t,this.falseExpr=r}return(i.prototype=new n).type="ConditionalNode",i.prototype.isConditionalNode=!0,i.prototype._compile=function(e,t){var n=this.condition._compile(e,t),i=this.trueExpr._compile(e,t),a=this.falseExpr._compile(e,t);return function(e,t,r){return function(e){if("number"==typeof e||"boolean"==typeof e||"string"==typeof e)return!!e;if(e){if(o.isBigNumber(e))return!e.isZero();if(o.isComplex(e))return!(!e.re&&!e.im);if(o.isUnit(e))return!!e.value}if(null==e)return!1;throw new TypeError('Unsupported type of condition "'+s(e)+'"')}(n(e,t,r))?i(e,t,r):a(e,t,r)}},i.prototype.forEach=function(e){e(this.condition,"condition",this),e(this.trueExpr,"trueExpr",this),e(this.falseExpr,"falseExpr",this)},i.prototype.map=function(e){return new i(this._ifNode(e(this.condition,"condition",this)),this._ifNode(e(this.trueExpr,"trueExpr",this)),this._ifNode(e(this.falseExpr,"falseExpr",this)))},i.prototype.clone=function(){return new i(this.condition,this.trueExpr,this.falseExpr)},i.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=c.getPrecedence(this,t),n=this.condition.toString(e),i=c.getPrecedence(this.condition,t);("all"===t||"OperatorNode"===this.condition.type||null!==i&&i<=r)&&(n="("+n+")");var a=this.trueExpr.toString(e),o=c.getPrecedence(this.trueExpr,t);("all"===t||"OperatorNode"===this.trueExpr.type||null!==o&&o<=r)&&(a="("+a+")");var s=this.falseExpr.toString(e),u=c.getPrecedence(this.falseExpr,t);return("all"===t||"OperatorNode"===this.falseExpr.type||null!==u&&u<=r)&&(s="("+s+")"),n+" ? "+a+" : "+s},i.prototype.toJSON=function(){return{mathjs:"ConditionalNode",condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}},i.fromJSON=function(e){return new i(e.condition,e.trueExpr,e.falseExpr)},i.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=c.getPrecedence(this,t),n=this.condition.toHTML(e),i=c.getPrecedence(this.condition,t);("all"===t||"OperatorNode"===this.condition.type||null!==i&&i<=r)&&(n='('+n+')');var a=this.trueExpr.toHTML(e),o=c.getPrecedence(this.trueExpr,t);("all"===t||"OperatorNode"===this.trueExpr.type||null!==o&&o<=r)&&(a='('+a+')');var s=this.falseExpr.toHTML(e),u=c.getPrecedence(this.falseExpr,t);return("all"===t||"OperatorNode"===this.falseExpr.type||null!==u&&u<=r)&&(s='('+s+')'),n+'?'+a+':'+s},i.prototype._toTex=function(e){return"\\begin{cases} {"+this.trueExpr.toTex(e)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(e)+"}\\\\{"+this.falseExpr.toTex(e)+"}, &\\quad{\\text{otherwise}}\\end{cases}"},i}},function(e,t,s){var u=s(2).forEach,c=s(2).map;t.name="BlockNode",t.path="expression.node",t.factory=function(n,e,t,r){var i=t(s(14)),o=t(s(144));function a(e){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new Error("Array expected");this.blocks=e.map(function(e){var t=e&&e.node,r=!e||void 0===e.visible||e.visible;if(!n.isNode(t))throw new TypeError('Property "node" must be a Node');if("boolean"!=typeof r)throw new TypeError('Property "visible" must be a boolean');return{node:t,visible:r}})}return(a.prototype=new i).type="BlockNode",a.prototype.isBlockNode=!0,a.prototype._compile=function(t,r){var e=c(this.blocks,function(e){return{eval:e.node._compile(t,r),visible:e.visible}});return function(r,n,i){var a=[];return u(e,function(e){var t=e.eval(r,n,i);e.visible&&a.push(t)}),new o(a)}},a.prototype.forEach=function(e){for(var t=0;t;')}).join('
')},a.prototype._toTex=function(t){return this.blocks.map(function(e){return e.node.toTex(t)+(e.visible?"":";")}).join("\\;\\;\n")},a}},function(e,t,u){var d=u(15).getSafeProperty,g=u(15).setSafeProperty;t.name="AssignmentNode",t.path="expression.node",t.factory=function(n,e,t,r){var i=t(u(14)),m=t(u(316)),h=t(u(133)),a=u(59);function o(e,t,r){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(this.object=e,this.index=r?t:null,this.value=r||t,!n.isSymbolNode(e)&&!n.isAccessorNode(e))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(n.isSymbolNode(e)&&"end"===e.name)throw new Error('Cannot assign to symbol "end"');if(this.index&&!n.isIndexNode(this.index))throw new TypeError('IndexNode expected as "index"');if(!n.isNode(this.value))throw new TypeError('Node expected as "value"');Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function s(e,t){t||(t="keep");var r=a.getPrecedence(e,t),n=a.getPrecedence(e.value,t);return"all"===t||null!==n&&n<=r}return(o.prototype=new i).type="AssignmentNode",o.prototype.isAssignmentNode=!0,o.prototype._compile=function(e,t){var o=this.object._compile(e,t),u=this.index?this.index._compile(e,t):null,c=this.value._compile(e,t),s=this.object.name;if(this.index){if(this.index.isObjectProperty()){var a=this.index.getObjectProperty();return function(e,t,r){var n=o(e,t,r),i=c(e,t,r);return g(n,a,i)}}if(n.isSymbolNode(this.object))return function(e,t,r){var n=o(e,t,r),i=c(e,t,r),a=u(e,t,n);return g(e,s,m(n,a,i)),i};var f=this.object.object._compile(e,t);if(this.object.index.isObjectProperty()){var l=this.object.index.getObjectProperty();return function(e,t,r){var n=f(e,t,r),i=d(n,l),a=u(e,t,i),o=c(e,t,r);return g(n,l,m(i,a,o)),o}}var p=this.object.index._compile(e,t);return function(e,t,r){var n=f(e,t,r),i=p(e,t,n),a=h(n,i),o=u(e,t,a),s=c(e,t,r);return m(n,i,m(a,o,s)),s}}if(!n.isSymbolNode(this.object))throw new TypeError("SymbolNode expected as object");return function(e,t,r){return g(e,s,c(e,t,r))}},o.prototype.forEach=function(e){e(this.object,"object",this),this.index&&e(this.index,"index",this),e(this.value,"value",this)},o.prototype.map=function(e){return new o(this._ifNode(e(this.object,"object",this)),this.index?this._ifNode(e(this.index,"index",this)):null,this._ifNode(e(this.value,"value",this)))},o.prototype.clone=function(){return new o(this.object,this.index,this.value)},o.prototype._toString=function(e){var t=this.object.toString(e),r=this.index?this.index.toString(e):"",n=this.value.toString(e);return s(this,e&&e.parenthesis)&&(n="("+n+")"),t+r+" = "+n},o.prototype.toJSON=function(){return{mathjs:"AssignmentNode",object:this.object,index:this.index,value:this.value}},o.fromJSON=function(e){return new o(e.object,e.index,e.value)},o.prototype.toHTML=function(e){var t=this.object.toHTML(e),r=this.index?this.index.toHTML(e):"",n=this.value.toHTML(e);return s(this,e&&e.parenthesis)&&(n='('+n+')'),t+r+'='+n},o.prototype._toTex=function(e){var t=this.object.toTex(e),r=this.index?this.index.toTex(e):"",n=this.value.toTex(e);return s(this,e&&e.parenthesis)&&(n="\\left("+n+"\\right)"),t+r+":="+n},o}},function(e,t,o){var s=o(2).map;t.name="ArrayNode",t.path="expression.node",t.factory=function(r,e,t,n){var i=t(o(14));function a(e){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(this.items=e||[],!Array.isArray(this.items)||!this.items.every(r.isNode))throw new TypeError("Array containing Nodes expected");var t=function(){throw new Error("Property `ArrayNode.nodes` is deprecated, use `ArrayNode.items` instead")};Object.defineProperty(this,"nodes",{get:t,set:t})}return(a.prototype=new i).type="ArrayNode",a.prototype.isArrayNode=!0,a.prototype._compile=function(t,r){var e=s(this.items,function(e){return e._compile(t,r)});if("Array"!==t.config().matrix){var i=t.matrix;return function(t,r,n){return i(s(e,function(e){return e(t,r,n)}))}}return function(t,r,n){return s(e,function(e){return e(t,r,n)})}},a.prototype.forEach=function(e){for(var t=0;t['+this.items.map(function(e){return e.toHTML(t)}).join(',')+']'},a.prototype._toTex=function(t){var r="\\begin{bmatrix}";return this.items.forEach(function(e){e.items?r+=e.items.map(function(e){return e.toTex(t)}).join("&"):r+=e.toTex(t),r+="\\\\"}),r+="\\end{bmatrix}"},a}},function(e,t,a){var o=a(38).transform,s=a(15).getSafeProperty;t.factory=function(e,t,r,n){var i=r(a(22));return function(e,t){try{if(Array.isArray(e))return i(e,t);if(e&&"function"==typeof e.subset)return e.subset(t);if("string"==typeof e)return i(e,t);if("object"==typeof e){if(!t.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return s(e,t.getObjectProperty())}throw new TypeError("Cannot apply index: unsupported type of object")}catch(e){throw o(e)}}}},function(e,t,r){e.exports={end:!0}},function(e,t,u){var c=u(15).getSafeProperty;t.name="AccessorNode",t.path="expression.node",t.factory=function(r,e,t,n){var i=t(u(14)),s=(t(u(86)),t(u(133)));function a(e,t){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(!r.isNode(e))throw new TypeError('Node expected for parameter "object"');if(!r.isIndexNode(t))throw new TypeError('IndexNode expected for parameter "index"');this.object=e||null,this.index=t,Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function o(e){return!(r.isAccessorNode(e)||r.isArrayNode(e)||r.isConstantNode(e)||r.isFunctionNode(e)||r.isObjectNode(e)||r.isParenthesisNode(e)||r.isSymbolNode(e))}return(a.prototype=new i).type="AccessorNode",a.prototype.isAccessorNode=!0,a.prototype._compile=function(e,t){var a=this.object._compile(e,t),o=this.index._compile(e,t);if(this.index.isObjectProperty()){var n=this.index.getObjectProperty();return function(e,t,r){return c(a(e,t,r),n)}}return function(e,t,r){var n=a(e,t,r),i=o(e,t,n);return s(n,i)}},a.prototype.forEach=function(e){e(this.object,"object",this),e(this.index,"index",this)},a.prototype.map=function(e){return new a(this._ifNode(e(this.object,"object",this)),this._ifNode(e(this.index,"index",this)))},a.prototype.clone=function(){return new a(this.object,this.index)},a.prototype._toString=function(e){var t=this.object.toString(e);return o(this.object)&&(t="("+t+")"),t+this.index.toString(e)},a.prototype.toHTML=function(e){var t=this.object.toHTML(e);return o(this.object)&&(t='('+t+')'),t+this.index.toHTML(e)},a.prototype._toTex=function(e){var t=this.object.toTex(e);return o(this.object)&&(t="\\left("+t+"\\right)"),t+this.index.toTex(e)},a.prototype.toJSON=function(){return{mathjs:"AccessorNode",object:this.object,index:this.index}},a.fromJSON=function(e){return new a(e.object,e.index)},a}},function(e,t,r){t.factory=function(r,e,t,n){return function(e,t){if("BigNumber"===t)return new r.BigNumber(e);if("Fraction"===t)return new r.Fraction(e);if("number"==typeof e)return e;if("Infinity"===e)return 1/0;if("NaN"===e)return NaN;if(!/^[\-+]?((\d+\.?\d*)|(\d*\.?\d+))([eE][+\-]?\d+)?$/.test(e))throw new Error('Invalid numeric value "'+e+'"');return parseFloat(e.replace(/^(0*)[0-9]/,function(e,t){return e.substring(t.length)}))}}},function(e,t){e.exports={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]}},function(e,t){e.exports={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]}},function(e,t,a){t.name="docs",t.path="expression",t.factory=function(e,t,r,n){var i={};return i.bignumber=a(515),i.boolean=a(514),i.complex=a(513),i.createUnit=a(512),i.fraction=a(511),i.index=a(510),i.matrix=a(509),i.number=a(508),i.sparse=a(507),i.splitUnit=a(506),i.string=a(505),i.unit=a(504),i.e=a(138),i.E=a(138),i.false=a(503),i.i=a(502),i[1/0]=a(501),i.LN2=a(500),i.LN10=a(499),i.LOG2E=a(498),i.LOG10E=a(497),i.NaN=a(496),i.null=a(495),i.pi=a(137),i.PI=a(137),i.phi=a(494),i.SQRT1_2=a(493),i.SQRT2=a(492),i.tau=a(491),i.true=a(490),i.version=a(489),i.speedOfLight={description:"Speed of light in vacuum",examples:["speedOfLight"]},i.gravitationConstant={description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},i.planckConstant={description:"Planck constant",examples:["planckConstant"]},i.reducedPlanckConstant={description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},i.magneticConstant={description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},i.electricConstant={description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},i.vacuumImpedance={description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},i.coulomb={description:"Coulomb's constant",examples:["coulomb"]},i.elementaryCharge={description:"Elementary charge",examples:["elementaryCharge"]},i.bohrMagneton={description:"Borh magneton",examples:["bohrMagneton"]},i.conductanceQuantum={description:"Conductance quantum",examples:["conductanceQuantum"]},i.inverseConductanceQuantum={description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},i.magneticFluxQuantum={description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},i.nuclearMagneton={description:"Nuclear magneton",examples:["nuclearMagneton"]},i.klitzing={description:"Von Klitzing constant",examples:["klitzing"]},i.bohrRadius={description:"Borh radius",examples:["bohrRadius"]},i.classicalElectronRadius={description:"Classical electron radius",examples:["classicalElectronRadius"]},i.electronMass={description:"Electron mass",examples:["electronMass"]},i.fermiCoupling={description:"Fermi coupling constant",examples:["fermiCoupling"]},i.fineStructure={description:"Fine-structure constant",examples:["fineStructure"]},i.hartreeEnergy={description:"Hartree energy",examples:["hartreeEnergy"]},i.protonMass={description:"Proton mass",examples:["protonMass"]},i.deuteronMass={description:"Deuteron Mass",examples:["deuteronMass"]},i.neutronMass={description:"Neutron mass",examples:["neutronMass"]},i.quantumOfCirculation={description:"Quantum of circulation",examples:["quantumOfCirculation"]},i.rydberg={description:"Rydberg constant",examples:["rydberg"]},i.thomsonCrossSection={description:"Thomson cross section",examples:["thomsonCrossSection"]},i.weakMixingAngle={description:"Weak mixing angle",examples:["weakMixingAngle"]},i.efimovFactor={description:"Efimov factor",examples:["efimovFactor"]},i.atomicMass={description:"Atomic mass constant",examples:["atomicMass"]},i.avogadro={description:"Avogadro's number",examples:["avogadro"]},i.boltzmann={description:"Boltzmann constant",examples:["boltzmann"]},i.faraday={description:"Faraday constant",examples:["faraday"]},i.firstRadiation={description:"First radiation constant",examples:["firstRadiation"]},i.loschmidt={description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},i.gasConstant={description:"Gas constant",examples:["gasConstant"]},i.molarPlanckConstant={description:"Molar Planck constant",examples:["molarPlanckConstant"]},i.molarVolume={description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},i.sackurTetrode={description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},i.secondRadiation={description:"Second radiation constant",examples:["secondRadiation"]},i.stefanBoltzmann={description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},i.wienDisplacement={description:"Wien displacement law constant",examples:["wienDisplacement"]},i.molarMass={description:"Molar mass constant",examples:["molarMass"]},i.molarMassC12={description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},i.gravity={description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},i.planckLength={description:"Planck length",examples:["planckLength"]},i.planckMass={description:"Planck mass",examples:["planckMass"]},i.planckTime={description:"Planck time",examples:["planckTime"]},i.planckCharge={description:"Planck charge",examples:["planckCharge"]},i.planckTemperature={description:"Planck temperature",examples:["planckTemperature"]},i.derivative=a(488),i.lsolve=a(487),i.lup=a(486),i.lusolve=a(485),i.simplify=a(484),i.rationalize=a(483),i.slu=a(482),i.usolve=a(481),i.qr=a(480),i.abs=a(479),i.add=a(478),i.cbrt=a(477),i.ceil=a(476),i.cube=a(475),i.divide=a(474),i.dotDivide=a(473),i.dotMultiply=a(472),i.dotPow=a(471),i.exp=a(470),i.expm=a(469),i.expm1=a(468),i.fix=a(467),i.floor=a(466),i.gcd=a(465),i.hypot=a(464),i.lcm=a(463),i.log=a(462),i.log2=a(461),i.log1p=a(460),i.log10=a(459),i.mod=a(458),i.multiply=a(457),i.norm=a(456),i.nthRoot=a(455),i.pow=a(454),i.round=a(453),i.sign=a(452),i.sqrt=a(451),i.sqrtm=a(450),i.square=a(449),i.subtract=a(448),i.unaryMinus=a(447),i.unaryPlus=a(446),i.xgcd=a(445),i.bitAnd=a(444),i.bitNot=a(443),i.bitOr=a(442),i.bitXor=a(441),i.leftShift=a(440),i.rightArithShift=a(439),i.rightLogShift=a(438),i.bellNumbers=a(437),i.catalan=a(436),i.composition=a(435),i.stirlingS2=a(434),i.config=a(433),i.import=a(432),i.typed=a(431),i.arg=a(430),i.conj=a(429),i.re=a(428),i.im=a(427),i.eval=a(426),i.help=a(425),i.distance=a(424),i.intersect=a(423),i.and=a(422),i.not=a(421),i.or=a(420),i.xor=a(419),i.concat=a(418),i.cross=a(417),i.det=a(416),i.diag=a(415),i.dot=a(414),i.eye=a(413),i.filter=a(412),i.flatten=a(411),i.forEach=a(410),i.inv=a(409),i.kron=a(408),i.map=a(407),i.ones=a(406),i.partitionSelect=a(405),i.range=a(404),i.resize=a(403),i.reshape=a(402),i.size=a(401),i.sort=a(400),i.squeeze=a(399),i.subset=a(398),i.trace=a(397),i.transpose=a(396),i.zeros=a(395),i.combinations=a(394),i.factorial=a(393),i.gamma=a(392),i.kldivergence=a(391),i.multinomial=a(390),i.permutations=a(389),i.pickRandom=a(388),i.random=a(387),i.randomInt=a(386),i.compare=a(385),i.compareNatural=a(384),i.deepEqual=a(383),i.equal=a(382),i.larger=a(381),i.largerEq=a(380),i.smaller=a(379),i.smallerEq=a(378),i.unequal=a(377),i.setCartesian=a(376),i.setDifference=a(375),i.setDistinct=a(374),i.setIntersect=a(373),i.setIsSubset=a(372),i.setMultiplicity=a(371),i.setPowerset=a(370),i.setSize=a(369),i.setSymDifference=a(368),i.setUnion=a(367),i.erf=a(366),i.mad=a(365),i.max=a(364),i.mean=a(363),i.median=a(362),i.min=a(361),i.mode=a(360),i.prod=a(359),i.quantileSeq=a(358),i.std=a(357),i.sum=a(356),i.var=a(355),i.acos=a(354),i.acosh=a(353),i.acot=a(352),i.acoth=a(351),i.acsc=a(350),i.acsch=a(349),i.asec=a(348),i.asech=a(347),i.asin=a(346),i.asinh=a(345),i.atan=a(344),i.atanh=a(343),i.atan2=a(342),i.cos=a(341),i.cosh=a(340),i.cot=a(339),i.coth=a(338),i.csc=a(337),i.csch=a(336),i.sec=a(335),i.sech=a(334),i.sin=a(333),i.sinh=a(332),i.tan=a(331),i.tanh=a(330),i.to=a(329),i.clone=a(328),i.format=a(327),i.isNaN=a(326),i.isInteger=a(325),i.isNegative=a(324),i.isNumeric=a(323),i.isPositive=a(322),i.isPrime=a(321),i.isZero=a(320),i.typeof=a(319),i}},function(e,t,r){var a=r(9);t.name="format",t.factory=function(e,t,r,n){var i=n("format",{any:a.format,"any, Object | function | number":a.format});return i.toTex=void 0,i}},function(e,t,l){var p=l(3).isInteger,m=l(3).toFixed,h=l(0),d="Number of decimals in function round must be an integer";t.name="round",t.factory=function(r,e,t,n){var i=t(l(1)),a=t(l(10)),o=t(l(40)),s=t(l(17)),u=t(l(18)),c=t(l(6)),f=n("round",{number:Math.round,"number, number":function(e,t){if(!p(t))throw new TypeError(d);if(t<0||15t.re?1:e.ret.im?1:e.imn&&(n=t[e[i]],r=[e[i]]);return r}}},function(e,t,l){var p=l(2).flatten;t.name="mad",t.factory=function(e,t,r,n){var i=r(l(23)),a=r(l(98)),o=r(l(93)),s=r(l(16)),u=r(l(31)),c=n("mad",{"Array | Matrix":f,"...":function(e){return f(e)}});return c.toTex=void 0,c;function f(e){if(0===(e=p(e.valueOf())).length)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var t=o(e);return o(a(e,function(e){return i(s(e,t))}))}catch(e){throw e instanceof TypeError&&-1!==e.message.indexOf("median")?new TypeError(e.message.replace("median","mad")):u(e,"mad")}}}},function(e,t,r){e.exports=[r(188),r(84),r(122),r(93),r(120),r(187),r(186),r(185),r(184),r(97),r(92)]},function(e,t,r){var a=r(0),o=r(3).sign;var s=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,2.1531153547440383e-8],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],u=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],c=Math.pow(2,53);t.name="erf",t.factory=function(t,e,r,n){var i=n("erf",{number:function(e){var t=Math.abs(e);return c<=t?o(e):t<=.46875?o(e)*function(e){var t,r=e*e,n=s[0][4]*r,i=r;for(t=0;t<3;t+=1)n=(n+s[0][t])*r,i=(i+u[0][t])*r;return e*(n+s[0][3])/(i+u[0][3])}(t):t<=4?o(e)*(1-function(e){var t,r=s[1][8]*e,n=e;for(t=0;t<7;t+=1)r=(r+s[1][t])*e,n=(n+u[1][t])*e;var i=(r+s[1][7])/(n+u[1][7]),a=parseInt(16*e)/16,o=(e-a)*(e+a);return Math.exp(-a*a)*Math.exp(-o)*i}(t)):o(e)*(1-function(e){var t,r=1/(e*e),n=s[2][5]*r,i=r;for(t=0;t<4;t+=1)n=(n+s[2][t])*r,i=(i+u[2][t])*r;var a=r*(n+s[2][4])/(i+u[2][4]);a=(.5641895835477563-a)/e,r=parseInt(16*e)/16;var o=(e-r)*(e+r);return Math.exp(-r*r)*Math.exp(-o)*a}(t))},BigNumber:function(e){return new t.BigNumber(i(e.toNumber()))},"Array | Matrix":function(e){return a(e,i)}});return i.toTex={1:"erf\\left(${args[0]}\\right)"},i}},function(e,t,r){e.exports=[r(190)]},function(e,t,f){var l=f(2).flatten;t.name="setUnion",t.factory=function(e,t,r,n){var i=r(f(27)),a=r(f(68)),o=r(f(24)),s=r(f(22)),u=r(f(95)),c=r(f(94));return n("setUnion",{"Array | Matrix, Array | Matrix":function(e,t){if(0===s(o(e),new i(0)))return l(t);if(0===s(o(t),new i(0)))return l(e);var r=l(e),n=l(t);return a(c(r,n),u(r,n))}})}},function(e,t,i){var o=i(2).flatten;t.name="setSize",t.factory=function(e,t,r,n){var a=r(i(26));return n("setSize",{"Array | Matrix":function(e){return Array.isArray(e)?o(e).length:o(e.toArray()).length},"Array | Matrix, boolean":function(e,t){if(!1===t||0===e.length)return Array.isArray(e)?o(e).length:o(e.toArray()).length;for(var r=o(Array.isArray(e)?e:e.toArray()).sort(a),n=1,i=1;ie[n+1].length&&(t=e[n],e[n]=e[n+1],e[n+1]=t);return e}(r)}});function u(e,t){for(var r=[],n=0;n>>=1;return(e+r)/t}},p.exports.resetGlobal=function(){Math.random=t},f(Math.random(),i)}).call(this,t(205))},function(e,t,r){var s=r(206),u=s();t.factory=function(e,t,r,n,i){var a;function o(e){a=null===e?u:s(String(e))}return o(t.randomSeed),i.on("config",function(e,t,r){void 0!==r.randomSeed&&o(e.randomSeed)}),function(){return a()}},t.math=!0},function(e,t,a){t.name="pickRandom",t.factory=function(e,t,r,n){var i=r(a(73))("uniform").pickRandom;return i.toTex=void 0,i}},function(e,t,a){var o=a(3).isInteger;function s(e){return e.isInteger()&&e.gte(0)}t.name="permutations",t.factory=function(i,e,t,r){var n=r("permutations",{"number | BigNumber":t(a(63)),"number, number":function(e,t){var r,n;if(!o(e)||e<0)throw new TypeError("Positive integer value expected in function permutations");if(!o(t)||t<0)throw new TypeError("Positive integer value expected in function permutations");if(eh)throw new Error("computing square root of matrix: iterative method could not converge")}while(dn)return e.substring(0,n);if(e.length>>t},"SparseMatrix, SparseMatrix":function(e,t){return f(e,t,d,!1)},"SparseMatrix, DenseMatrix":function(e,t){return c(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return m(e,t,d)},"Array, Array":function(e,t){return d(a(e),a(t)).valueOf()},"Array, Matrix":function(e,t){return d(a(e),t)},"Matrix, Array":function(e,t){return d(e,a(t))},"SparseMatrix, number | BigNumber":function(e,t){return o(t,0)?e.clone():p(e,t,d,!1)},"DenseMatrix, number | BigNumber":function(e,t){return o(t,0)?e.clone():h(e,t,d,!1)},"number | BigNumber, SparseMatrix":function(e,t){return o(e,0)?s(t.size(),t.storage()):l(t,e,d,!0)},"number | BigNumber, DenseMatrix":function(e,t){return o(e,0)?s(t.size(),t.storage()):h(t,e,d,!0)},"Array, number | BigNumber":function(e,t){return d(a(e),t).valueOf()},"number | BigNumber, Array":function(e,t){return d(e,a(t)).valueOf()}});return d.toTex={2:"\\left(${args[0]}"+i.operators.rightLogShift+"${args[1]}\\right)"},d}},function(e,t,r){e.exports=function(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function rightArithShift");var r=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new r(NaN):e.isZero()||t.isZero()?e:t.isFinite()?t.lt(55)?e.div(Math.pow(2,t.toNumber())+"").floor():e.div(new r(2).pow(t)).floor():e.isNegative()?new r(-1):e.isFinite()?new r(0):new r(NaN)}},function(e,t,g){var v=g(3).isInteger,y=g(245);t.name="rightArithShift",t.factory=function(e,t,r,n){var i=g(4),a=r(g(1)),o=r(g(10)),s=r(g(40)),u=r(g(34)),c=r(g(25)),f=r(g(75)),l=r(g(43)),p=r(g(17)),m=r(g(7)),h=r(g(6)),d=n("rightArithShift",{"number, number":function(e,t){if(!v(e)||!v(t))throw new Error("Integers expected in function rightArithShift");return e>>t},"BigNumber, BigNumber":y,"SparseMatrix, SparseMatrix":function(e,t){return f(e,t,d,!1)},"SparseMatrix, DenseMatrix":function(e,t){return c(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return m(e,t,d)},"Array, Array":function(e,t){return d(a(e),a(t)).valueOf()},"Array, Matrix":function(e,t){return d(a(e),t)},"Matrix, Array":function(e,t){return d(e,a(t))},"SparseMatrix, number | BigNumber":function(e,t){return o(t,0)?e.clone():p(e,t,d,!1)},"DenseMatrix, number | BigNumber":function(e,t){return o(t,0)?e.clone():h(e,t,d,!1)},"number | BigNumber, SparseMatrix":function(e,t){return o(e,0)?s(t.size(),t.storage()):l(t,e,d,!0)},"number | BigNumber, DenseMatrix":function(e,t){return o(e,0)?s(t.size(),t.storage()):h(t,e,d,!0)},"Array, number | BigNumber":function(e,t){return d(a(e),t).valueOf()},"number | BigNumber, Array":function(e,t){return d(e,a(t)).valueOf()}});return d.toTex={2:"\\left(${args[0]}"+i.operators.rightArithShift+"${args[1]}\\right)"},d}},function(e,t,r){e.exports=function(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function leftShift");var r=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new r(NaN):e.isZero()||t.isZero()?e:e.isFinite()||t.isFinite()?t.lt(55)?e.times(Math.pow(2,t.toNumber())+""):e.times(new r(2).pow(t)):new r(NaN)}},function(e,t,g){var v=g(3).isInteger,y=g(247);t.name="leftShift",t.factory=function(e,t,r,n){var i=g(4),a=r(g(1)),o=r(g(10)),s=r(g(40)),u=r(g(34)),c=r(g(25)),f=r(g(75)),l=r(g(43)),p=r(g(17)),m=r(g(7)),h=r(g(6)),d=n("leftShift",{"number, number":function(e,t){if(!v(e)||!v(t))throw new Error("Integers expected in function leftShift");return e<i))for(var l=s[c+1];f=k?_[P+m]-=g:0!==_[P+m]&&(_[P+m]=_[I+m]+Z)}for(v=H;v= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]}},function(e,t){e.exports={name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]}},function(e,t){e.exports={name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]}},function(e,t){e.exports={name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]}},function(e,t){e.exports={name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]}},function(e,t){e.exports={name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 if x is larger than y, -1 if x is smaller than y, and 0 if x and y are equal.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural"]}},function(e,t){e.exports={name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]}},function(e,t){e.exports={name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]}},function(e,t){e.exports={name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]}},function(e,t){e.exports={name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","factorial"]}},function(e,t){e.exports={name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]}},function(e,t){e.exports={name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]}},function(e,t){e.exports={name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]}},function(e,t){e.exports={name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","permutations","gamma"]}},function(e,t){e.exports={name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["permutations","factorial"]}},function(e,t){e.exports={name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","eye","inv","ones","range","size","squeeze","subset","trace","transpose"]}},function(e,t){e.exports={name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","eye","inv","ones","range","size","squeeze","subset","trace","zeros"]}},function(e,t){e.exports={name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","eye","inv","ones","range","size","squeeze","subset","transpose","zeros"]}},function(e,t){e.exports={name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of a matrix or string. Indexes are one-based. Both the ranges lower-bound and upper-bound are included.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]"],seealso:["concat","det","diag","eye","inv","ones","range","size","squeeze","trace","transpose","zeros"]}},function(e,t){e.exports={name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","eye","inv","ones","range","size","subset","trace","transpose","zeros"]}},function(e,t){e.exports={name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"])',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]}},function(e,t){e.exports={name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","det","diag","eye","inv","ones","range","squeeze","subset","trace","transpose","zeros"]}},function(e,t){e.exports={name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])"],seealso:["size","squeeze","resize"]}},function(e,t){e.exports={name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]}},function(e,t){e.exports={name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","eye","inv","ones","size","squeeze","subset","trace","transpose","zeros"]}},function(e,t){e.exports={name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1)'],seealso:["sort"]}},function(e,t){e.exports={name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","eye","inv","range","size","squeeze","subset","trace","transpose","zeros"]}},function(e,t){e.exports={name:"map",category:"Matrix",syntax:["map(x, callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.",examples:["map([1, 2, 3], square)"],seealso:["filter","forEach"]}},function(e,t){e.exports={name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]}},function(e,t){e.exports={name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","eye","ones","range","size","squeeze","subset","trace","transpose","zeros"]}},function(e,t){e.exports={name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["forEach([1, 2, 3], function(val) { console.log(val) })"],seealso:["map","sort","filter"]}},function(e,t){e.exports={name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]}},function(e,t){e.exports={name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]}},function(e,t){e.exports={name:"eye",category:"Matrix",syntax:["eye(n)","eye(m, n)","eye([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["eye(3)","eye(3, 5)","a = [1, 2, 3; 4, 5, 6]","eye(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]}},function(e,t){e.exports={name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]}},function(e,t){e.exports={name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","eye","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]}},function(e,t){e.exports={name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","eye","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]}},function(e,t){e.exports={name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0], [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4], [5, 6, 7])"],seealso:["multiply","dot"]}},function(e,t){e.exports={name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","eye","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]}},function(e,t){e.exports={name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]}},function(e,t){e.exports={name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]}},function(e,t){e.exports={name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]}},function(e,t){e.exports={name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]}},function(e,t){e.exports={name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])"],seealso:[]}},function(e,t){e.exports={name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]}},function(e,t){e.exports={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]}},function(e,t){e.exports={name:"eval",category:"Expression",syntax:["eval(expression)","eval([expr1, expr2, expr3, ...])"],description:"Evaluate an expression or an array with expressions.",examples:['eval("2 + 3")','eval("sqrt(" + 4 + ")")'],seealso:[]}},function(e,t){e.exports={name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]}},function(e,t){e.exports={name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]}},function(e,t){e.exports={name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]}},function(e,t){e.exports={name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]}},function(e,t){e.exports={name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number, number": f(x)=x+x })',"double(2)",'double("hello")'],seealso:[]}},function(e,t){e.exports={name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]}},function(e,t){e.exports={name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]}},function(e,t){e.exports={name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"he Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers"]}},function(e,t){e.exports={name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]}},function(e,t){e.exports={name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]}},function(e,t){e.exports={name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]}},function(e,t){e.exports={name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]}},function(e,t){e.exports={name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]}},function(e,t){e.exports={name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]}},function(e,t){e.exports={name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]}},function(e,t){e.exports={name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]}},function(e,t){e.exports={name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]}},function(e,t){e.exports={name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]}},function(e,t){e.exports={name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]}},function(e,t){e.exports={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]}},function(e,t){e.exports={name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]}},function(e,t){e.exports={name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]}},function(e,t){e.exports={name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]}},function(e,t){e.exports={name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[1, 2], [3, 4]])"],seealso:["sqrt","abs","square","multiply"]}},function(e,t){e.exports={name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply"]}},function(e,t){e.exports={name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]}},function(e,t){e.exports={name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)"],seealso:["ceil","floor","fix"]}},function(e,t){e.exports={name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)"],seealso:["multiply"]}},function(e,t){e.exports={name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["sqrt","pow"]}},function(e,t){e.exports={name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']}},function(e,t){e.exports={name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]}},function(e,t){e.exports={name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]}},function(e,t){e.exports={name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]}},function(e,t){e.exports={name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]}},function(e,t){e.exports={name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]}},function(e,t){e.exports={name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]}},function(e,t){e.exports={name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]}},function(e,t){e.exports={name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenusa of a list with values. ",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]}},function(e,t){e.exports={name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]}},function(e,t){e.exports={name:"floor",category:"Arithmetic",syntax:["floor(x)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)"],seealso:["ceil","fix","round"]}},function(e,t){e.exports={name:"fix",category:"Arithmetic",syntax:["fix(x)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)"],seealso:["ceil","floor","round"]}},function(e,t){e.exports={name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]}},function(e,t){e.exports={name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]}},function(e,t){e.exports={name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula"],seealso:["expm","expm1","pow","log"]}},function(e,t){e.exports={name:"dotpow",category:"Operators",syntax:["x .^ y","dotpow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]}},function(e,t){e.exports={name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]}},function(e,t){e.exports={name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]}},function(e,t){e.exports={name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]}},function(e,t){e.exports={name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]}},function(e,t){e.exports={name:"ceil",category:"Arithmetic",syntax:["ceil(x)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)"],seealso:["floor","fix","round"]}},function(e,t){e.exports={name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]}},function(e,t){e.exports={name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]}},function(e,t){e.exports={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]}},function(e,t){e.exports={name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])"],seealso:["lup","slu","matrix"]}},function(e,t){e.exports={name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Solves the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["lup","lusolve","lsolve","matrix","sparse"]}},function(e,t){e.exports={name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]}},function(e,t){e.exports={name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]}},function(e,t){e.exports={name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.eval({x: 2})"],seealso:["derivative","parse","eval"]}},function(e,t){e.exports={name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]}},function(e,t){e.exports={name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]}},function(e,t){e.exports={name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Solves the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lup","lusolve","usolve","matrix","sparse"]}},function(e,t){e.exports={name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.eval({x: 3})"],seealso:["simplify","parse","eval"]}},function(e,t){e.exports={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]}},function(e,t){e.exports={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]}},function(e,t){e.exports={name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]}},function(e,t){e.exports={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]}},function(e,t){e.exports={name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]}},function(e,t){e.exports={name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]}},function(e,t){e.exports={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]}},function(e,t){e.exports={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]}},function(e,t){e.exports={name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]}},function(e,t){e.exports={name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]}},function(e,t){e.exports={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]}},function(e,t){e.exports={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]}},function(e,t){e.exports={name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]}},function(e,t){e.exports={name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]}},function(e,t){e.exports={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]}},function(e,t){e.exports={name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]}},function(e,t){e.exports={name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]}},function(e,t){e.exports={name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]}},function(e,t){e.exports={name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]}},function(e,t){e.exports={name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","boolean","complex","fraction","index","matrix","string","unit"]}},function(e,t){e.exports={name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]}},function(e,t){e.exports={name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["[]","[1, 2, 3]","A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[0:2, 0:2] = ones(2, 2)"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]}},function(e,t){e.exports={name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(num,den)"],description:"Create a fraction from a number or from a numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]}},function(e,t){e.exports={name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]}},function(e,t){e.exports={name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]}},function(e,t){e.exports={name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]}},function(e,t){e.exports={name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","complex","fraction","index","matrix","string","unit"]}},function(e,t,r){e.exports=[r(139),r(318),r(313),r(311),r(300),r(39),r(123)]},function(e,t){e.exports="4.3.0"},function(e,t,u){var n=u(5),c=u(143);function f(e,t,r){e[t]=r,e.expression.mathWithTransform[t]=r}function l(e,t,r){n.lazy(e,t,r),n.lazy(e.expression.mathWithTransform,t,r)}t.factory=function r(n,i,a,o,s){s.on("config",function(e,t){e.number!==t.number&&r(n,i,a,o,s)}),f(s,"true",!0),f(s,"false",!1),f(s,"null",null),f(s,"uninitialized","Error: Constant uninitialized is removed since v4.0.0. Use null instead"),"BigNumber"===i.number?(f(s,"Infinity",new n.BigNumber(1/0)),f(s,"NaN",new n.BigNumber(NaN)),l(s,"pi",function(){return c.pi(n.BigNumber)}),l(s,"tau",function(){return c.tau(n.BigNumber)}),l(s,"e",function(){return c.e(n.BigNumber)}),l(s,"phi",function(){return c.phi(n.BigNumber)}),l(s,"E",function(){return s.e}),l(s,"LN2",function(){return new n.BigNumber(2).ln()}),l(s,"LN10",function(){return new n.BigNumber(10).ln()}),l(s,"LOG2E",function(){return new n.BigNumber(1).div(new n.BigNumber(2).ln())}),l(s,"LOG10E",function(){return new n.BigNumber(1).div(new n.BigNumber(10).ln())}),l(s,"PI",function(){return s.pi}),l(s,"SQRT1_2",function(){return new n.BigNumber("0.5").sqrt()}),l(s,"SQRT2",function(){return new n.BigNumber(2).sqrt()})):(f(s,"Infinity",1/0),f(s,"NaN",NaN),f(s,"pi",Math.PI),f(s,"tau",2*Math.PI),f(s,"e",Math.E),f(s,"phi",1.618033988749895),f(s,"E",s.e),f(s,"LN2",Math.LN2),f(s,"LN10",Math.LN10),f(s,"LOG2E",Math.LOG2E),f(s,"LOG10E",Math.LOG10E),f(s,"PI",s.pi),f(s,"SQRT1_2",Math.SQRT1_2),f(s,"SQRT2",Math.SQRT2)),f(s,"i",n.Complex.I),f(s,"version",u(517))},t.lazy=!1,t.math=!0},function(e,t,r){var n=r(5).lazy;function o(e,t,r){n(e,t,r),n(e.expression.mathWithTransform,t,r)}t.factory=function(r,e,t,n,i){function a(e){var t=r.Unit.parse(e);return t.fixPrefix=!0,t}o(i,"speedOfLight",function(){return a("299792458 m s^-1")}),o(i,"gravitationConstant",function(){return a("6.6738480e-11 m^3 kg^-1 s^-2")}),o(i,"planckConstant",function(){return a("6.626069311e-34 J s")}),o(i,"reducedPlanckConstant",function(){return a("1.05457172647e-34 J s")}),o(i,"magneticConstant",function(){return a("1.2566370614e-6 N A^-2")}),o(i,"electricConstant",function(){return a("8.854187817e-12 F m^-1")}),o(i,"vacuumImpedance",function(){return a("376.730313461 ohm")}),o(i,"coulomb",function(){return a("8.9875517873681764e9 N m^2 C^-2")}),o(i,"elementaryCharge",function(){return a("1.60217656535e-19 C")}),o(i,"bohrMagneton",function(){return a("9.2740096820e-24 J T^-1")}),o(i,"conductanceQuantum",function(){return a("7.748091734625e-5 S")}),o(i,"inverseConductanceQuantum",function(){return a("12906.403721742 ohm")}),o(i,"magneticFluxQuantum",function(){return a("2.06783375846e-15 Wb")}),o(i,"nuclearMagneton",function(){return a("5.0507835311e-27 J T^-1")}),o(i,"klitzing",function(){return a("25812.807443484 ohm")}),o(i,"bohrRadius",function(){return a("5.291772109217e-11 m")}),o(i,"classicalElectronRadius",function(){return a("2.817940326727e-15 m")}),o(i,"electronMass",function(){return a("9.1093829140e-31 kg")}),o(i,"fermiCoupling",function(){return a("1.1663645e-5 GeV^-2")}),o(i,"fineStructure",function(){return.007297352569824}),o(i,"hartreeEnergy",function(){return a("4.3597443419e-18 J")}),o(i,"protonMass",function(){return a("1.67262177774e-27 kg")}),o(i,"deuteronMass",function(){return a("3.3435830926e-27 kg")}),o(i,"neutronMass",function(){return a("1.6749271613e-27 kg")}),o(i,"quantumOfCirculation",function(){return a("3.636947552024e-4 m^2 s^-1")}),o(i,"rydberg",function(){return a("10973731.56853955 m^-1")}),o(i,"thomsonCrossSection",function(){return a("6.65245873413e-29 m^2")}),o(i,"weakMixingAngle",function(){return.222321}),o(i,"efimovFactor",function(){return 22.7}),o(i,"atomicMass",function(){return a("1.66053892173e-27 kg")}),o(i,"avogadro",function(){return a("6.0221412927e23 mol^-1")}),o(i,"boltzmann",function(){return a("1.380648813e-23 J K^-1")}),o(i,"faraday",function(){return a("96485.336521 C mol^-1")}),o(i,"firstRadiation",function(){return a("3.7417715317e-16 W m^2")}),o(i,"loschmidt",function(){return a("2.686780524e25 m^-3")}),o(i,"gasConstant",function(){return a("8.314462175 J K^-1 mol^-1")}),o(i,"molarPlanckConstant",function(){return a("3.990312717628e-10 J s mol^-1")}),o(i,"molarVolume",function(){return a("2.241396820e-10 m^3 mol^-1")}),o(i,"sackurTetrode",function(){return-1.164870823}),o(i,"secondRadiation",function(){return a("1.438777013e-2 m K")}),o(i,"stefanBoltzmann",function(){return a("5.67037321e-8 W m^-2 K^-4")}),o(i,"wienDisplacement",function(){return a("2.897772126e-3 m K")}),o(i,"molarMass",function(){return a("1e-3 kg mol^-1")}),o(i,"molarMassC12",function(){return a("1.2e-2 kg mol^-1")}),o(i,"gravity",function(){return a("9.80665 m s^-2")}),o(i,"planckLength",function(){return a("1.61619997e-35 m")}),o(i,"planckMass",function(){return a("2.1765113e-8 kg")}),o(i,"planckTime",function(){return a("5.3910632e-44 s")}),o(i,"planckCharge",function(){return a("1.87554595641e-18 C")}),o(i,"planckTemperature",function(){return a("1.41683385e+32 K")})},t.lazy=!1,t.math=!0},function(e,t,r){r(0);t.name="splitUnit",t.factory=function(e,t,r,n){return n("splitUnit",{"Unit, Array":function(e,t){return e.splitUnit(t)}})}},function(e,t,r){r(0);t.name="createUnit",t.factory=function(i,e,t,r){return r("createUnit",{"Object, Object":function(e,t){return i.Unit.createUnit(e,t)},Object:function(e){return i.Unit.createUnit(e,{})},"string, Unit | string | Object, Object":function(e,t,r){var n={};return n[e]=t,i.Unit.createUnit(n,r)},"string, Unit | string | Object":function(e,t){var r={};return r[e]=t,i.Unit.createUnit(r,{})},string:function(e){var t={};return t[e]={},i.Unit.createUnit(t,{})}})}},function(e,t,r){var a=r(0);t.name="unit",t.factory=function(r,e,t,n){var i=n("unit",{Unit:function(e){return e.clone()},string:function(e){return r.Unit.isValuelessUnit(e)?new r.Unit(null,e):r.Unit.parse(e)},"number | BigNumber | Fraction | Complex, string":function(e,t){return new r.Unit(e,t)},"Array | Matrix":function(e){return a(e,i)}});return i.toTex={1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},i}},function(e,t,G){var Z=G(9).endsWith,V=G(5).clone,W=G(143);t.name="Unit",t.path="type",t.factory=function(g,v,e,t,r){var y,x,w,u=e(G(20)),c=e(G(16)),f=e(G(21)),l=e(G(12)),p=e(G(41)),m=e(G(23)),h=e(G(142)),d=e(G(141)),b=e(G(50)),i=e(G(60)),o=e(G(140)),N=e(G(49)),n=e(G(87)),a=e(G(147));function M(e,t){if(!(this instanceof M))throw new Error("Constructor must be called with the new operator");if(null!=e&&!i(e)&&!g.isComplex(e))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(null!=t&&("string"!=typeof t||""===t))throw new TypeError("Second parameter in Unit constructor must be a string");if(null!=t){var r=M.parse(t);this.units=r.units,this.dimensions=r.dimensions}else{this.units=[{unit:U,prefix:B.NONE,power:0}],this.dimensions=[];for(var n=0;n=e&&(c(o.value,0)||r(o.key,o.value,this)),(o=n.extractMinimum())&&a.push(o);for(var s=0;s");for(var c=t.min()[0],f=t.min()[1],l=i[0],p=i[1],m=0;m "+(this._values?y.format(this._values[u],e):"X")}return i},M.prototype.toString=function(){return y.format(this.toArray())},M.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},M.prototype.diagonal=function(e){if(e){if(w.isBigNumber(e)&&(e=e.toNumber()),!O(e)||!S(e))throw new TypeError("The parameter k must be an integer number")}else e=0;var t=0>=1)1&t&&(n=n*e%r);return n}(10,r,t),a=0;a<300;a++){if(n===i)return a;n=10*n%t,i=10*i%t}return 0}(0,r,n),a=-1===this.s?"-":"";if(a+=t/r|0,t%=r,(t*=10)&&(a+="."),n){for(var o=i;o--;)a+=t/r|0,t%=r,t*=10;a+="(";for(o=n;o--;)a+=t/r|0,t%=r,t*=10;a+=")"}else for(o=15;t&&o--;)a+=t/r|0,t%=r,t*=10;return a}},void 0===(o=function(){return u}.apply(a,[]))||(i.exports=o)}()},function(e,t,r){var i=r(535);i.prototype.type="Fraction",i.prototype.isFraction=!0,i.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},i.fromJSON=function(e){return new i(e)},t.name="Fraction",t.path="type",t.factory=function(e,t,r,n){return i}},function(e,t,r){e.exports=[r(536),r(146)]},function(e,t,r){var l={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},p={"–":"\\--","—":"\\---"," ":"~","\t":"\\qquad{}","\r\n":"\\\\newline{}","\n":"\\\\newline{}"},m=function(e,t){return Object.assign({},e,t)};e.exports=function(e){for(var t=1r-1&&(void 0===a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}M.absoluteValue=M.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),k(e)},M.ceil=function(){return k(new this.constructor(this),this.e+1,2)},M.comparedTo=M.cmp=function(e){var t,r,n,i,a=this.d,o=(e=new this.constructor(e)).d,s=this.s,u=e.s;if(!a||!o)return s&&u?s!==u?s:a===o?0:!a^s<0?1:-1:NaN;if(!a[0]||!o[0])return a[0]?s:o[0]?-u:0;if(s!==u)return s;if(this.e!==e.e)return this.e>e.e^s<0?1:-1;for(t=0,r=(n=a.length)<(i=o.length)?n:i;to[t]^s<0?1:-1;return n===i?0:ithis.d.length-2},M.isNaN=function(){return!this.s},M.isNegative=M.isNeg=function(){return this.s<0},M.isPositive=M.isPos=function(){return 0t&&(t=this.e+1)):t=NaN,t},M.round=function(){var e=this.constructor;return k(new e(this),this.e+1,e.rounding)},M.sine=M.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+U,n.rounding=1,r=function(e,t){var r,n=t.d.length;if(n<3)return Z(e,2,t,t);r=16<(r=1.4*Math.sqrt(n))?16:0|r,t=t.times(Math.pow(5,-r)),t=Z(e,2,t,t);for(var i,a=new e(5),o=new e(16),s=new e(20);r--;)i=t.times(t),t=t.times(a.plus(i.times(o.times(i).minus(s))));return t}(n,V(n,r)),n.precision=e,n.rounding=t,k(2=e.d.length-1&&(r=c<0?-c:c)<=9007199254740991)return i=L(u,s,r,n),e.s<0?new u(1).div(i):k(i,n,a);if((o=s.s)<0){if(tu.maxE+1||t=i.toExpPos):(A(e,1,d),void 0===t?t=i.rounding:A(t,0,8),r=T(n=k(new i(n),e,t),e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r},M.toSignificantDigits=M.toSD=function(e,t){var r=this.constructor;return void 0===e?(e=r.precision,t=r.rounding):(A(e,1,d),void 0===t?t=r.rounding:A(t,0,8)),k(new r(this),e,t)},M.toString=function(){var e=this.constructor,t=T(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()&&!this.isZero()?"-"+t:t},M.truncated=M.trunc=function(){return k(new this.constructor(this),this.e+1,1)},M.valueOf=M.toJSON=function(){var e=this.constructor,t=T(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()?"-"+t:t};var _=function(){function C(e,t,r){var n,i=0,a=e.length;for(e=e.slice();a--;)n=e[a]*t+i,e[a]=n%r|0,i=n/r|0;return i&&e.unshift(i),e}function z(e,t,r,n){var i,a;if(r!=n)a=nt[i]?1:-1;break}return a}function B(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r](_[u]||0)&&s--,null==r?(x=r=O.precision,n=O.rounding):x=i?r+(e.e-t.e)+1:r,x<0)d.push(1),l=!0;else{if(x=x/f+2|0,u=0,1==E){for(T=T[c=0],x++;(u=a/2&&++M;c=0,(o=z(T,g,E,v))<0?(y=g[0],E!=v&&(y=y*a+(g[1]||0)),1<(c=y/M|0)?(a<=c&&(c=a-1),1==(o=z(p=C(T,c,a),g,m=p.length,v=g.length))&&(c--,B(p,Em.maxE?(e.d=null,e.e=NaN):e.ee.constructor.maxE?(e.d=null,e.e=NaN):e.ei-1;)l[r]=0,r||(++a,l.unshift(1));for(u=l.length;!l[u-1];--u);for(o=0,f="";ou)for(a-=u;a--;)f+="0";else at)return e.length=t,!0}function J(e){return new this(e).abs()}function Y(e){return new this(e).acos()}function X(e){return new this(e).acosh()}function Q(e,t){return new this(e).plus(t)}function K(e){return new this(e).asin()}function ee(e){return new this(e).asinh()}function te(e){return new this(e).atan()}function re(e){return new this(e).atanh()}function ne(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,a=n+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(r=t.s<0?B(this,n,i):new this(0)).s=e.s:!e.d||t.isZero()?(r=B(this,a,1).times(.5)).s=e.s:t.s<0?(this.precision=a,this.rounding=1,r=this.atan(_(e,t,a,1)),t=B(this,a,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(_(e,t,a,1)):(r=B(this,a,1).times(0=a+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(t=W(e[0]),function(e){return t(e[0])&&1===e.length}):2===e.length?(t=W(e[0]),n=W(e[1]),function(e){return t(e[0])&&n(e[1])&&2===e.length}):(r=e.map(W),function(e){for(var t=0;tl?(n=new TypeError("Too many arguments in function "+o+" (expected: "+l+", actual: "+r.length+")")).data={category:"tooManyArgs",fn:o,index:r.length,expectedLength:l}:(n=new TypeError('Arguments of type "'+r.join(", ")+'" do not match any of the defined signatures of function '+o+".")).data={category:"mismatch",actual:r.map($)},n}(t,arguments,n)},F=function(e,t){return arguments.length===B&&m(e)&&x(t)?O.apply(null,arguments):arguments.length===I&&h(e)&&w(t)?S.apply(null,arguments):arguments.length===P&&d(e)&&b(t)?_.apply(null,arguments):arguments.length===R&&g(e)&&N(t)?T.apply(null,arguments):arguments.length===U&&v(e)&&M(t)?C.apply(null,arguments):arguments.length===k&&y(e)&&E(t)?z.apply(null,arguments):L.apply(null,arguments)};try{Object.defineProperty(F,"name",{value:t})}catch(e){}return F.signatures=(i={},n.forEach(function(t){t.params.some(V)||te(t.params,!0).forEach(function(e){i[H(e)]=t.fn})}),i),F}function m(e){return-1===j.ignore.indexOf(e)}function re(e){return e.trim()}function h(e){return!!e}function ne(e){return null!==e}function ie(e){return 0===e.types.length}function d(e){return e[e.length-1]}function ae(e,t,r){return Array.prototype.slice.call(e,t,r)}function oe(e,t){for(var r=0;r15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new r.BigNumber(e)}},{from:"number",to:"Complex",convert:function(e){return new r.Complex(e,0)}},{from:"number",to:"string",convert:function(e){return e+""}},{from:"BigNumber",to:"Complex",convert:function(e){return new r.Complex(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return new r.Complex(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){if(new r.Fraction(e).valueOf()!==e)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return new r.Fraction(e)}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw new Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(t){try{return new r.BigNumber(t)}catch(e){throw new Error('Cannot convert "'+t+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(t){try{return new r.Fraction(t)}catch(e){throw new Error('Cannot convert "'+t+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(t){try{return new r.Complex(t)}catch(e){throw new Error('Cannot convert "'+t+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return new r.BigNumber(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return new r.Fraction(+e)}},{from:"boolean",to:"string",convert:function(e){return+e}},{from:"Array",to:"Matrix",convert:function(e){return new r.DenseMatrix(e)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}],e}},function(e,t,r){var u=r(5).isFactory,c=r(557),f=r(148),l=r(554),p=r(553);t.create=function(e){if("function"!=typeof Object.create)throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var n=[],i=[],a=f.mixin({});a.type={},a.expression={transform:{},mathWithTransform:{}},a.typed=c.create(a.type);var o={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function s(e){if(!u(e))throw new Error("Factory object with properties `type`, `name`, and `factory` expected");var t,r=n.indexOf(e);return-1===r?(t=!0===e.math?e.factory(a.type,o,s,a.typed,a):e.factory(a.type,o,s,a.typed),n.push(e),i.push(t)):t=i[r],t}return a.import=s(l),a.config=s(p),a.expression.mathWithTransform.config=a.config,e&&a.config(e),a}},function(e,t,r){e.exports=r(558)},function(e,t,n){var i=n(559);e.exports=function e(t){var r=i.create(t);return r.create=e,r.import(n(552)),r}()}])});
//# sourceMappingURL=math.min.map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy