nerdamer
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -9,3 +9,3 @@ { | ||
"license": "MIT", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"homepage": "http://nerdamer.com/", | ||
@@ -53,6 +53,4 @@ "directory": { | ||
"devDependencies": { | ||
"big-integer": "1.6.41", | ||
"decimal.js": "10.1.1", | ||
"jasmine": "^2.6.0" | ||
} | ||
} |
14
Solve.js
@@ -179,2 +179,14 @@ /* | ||
/** | ||
* Sets two expressions equal | ||
* @param {Symbol} symbol | ||
* @returns {Expression} | ||
*/ | ||
core.Expression.prototype.equals = function(symbol) { | ||
if(symbol instanceof core.Expression) | ||
symbol = symbol.symbol; //grab the symbol if it's an expression | ||
var eq = new Equation(this.symbol, symbol); | ||
return eq; | ||
}; | ||
core.Expression.prototype.solveFor = function (x) { | ||
@@ -274,3 +286,3 @@ var symbol; | ||
var __ = core.Solve = { | ||
version: '2.0.2', | ||
version: '2.0.3', | ||
solutions: [], | ||
@@ -277,0 +289,0 @@ solve: function (eq, variable) { |
@@ -756,2 +756,7 @@ /* global expect */ | ||
}); | ||
it('should calculate nth roots correctly', function() { | ||
expect(nerdamer('roots((-1)^(1/5))').evaluate().text()).toEqual('[0.5877852522924731*i+0.8090169943749475,-0.3090169943749474+0.9510565162951536*i,-1+1.2246467991473532e-16*i,-0.30901699437494756-0.9510565162951535*i,-0.5877852522924734*i+0.8090169943749473]'); | ||
expect(nerdamer('roots((2)^(1/3))').evaluate().text()).toEqual('[1.1224620483093812,-1.1224620483093812]'); | ||
}); | ||
}); |
@@ -290,2 +290,6 @@ /* global expect */ | ||
{ | ||
given: 'integrate((22/7)^x,x)', | ||
expected: '(log(1/7)+log(22))^(-1)*22^x*7^(-x)' | ||
}, | ||
{ | ||
given: 'integrate(cos(x), x)', | ||
@@ -292,0 +296,0 @@ expected: 'sin(x)' |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1272136
1
24861