0.0.3 • Published 8 years ago
complexcompute v0.0.3
##An Object for Complex Numbers
It provides 5 Methods:
add();
sub();
mul();
div();
exp();
ln();
Node
npm install complexcompute
var Complex = require("Complex")
console.log(new Complex(5,3).exp());
##Testing
node testcomplex
##Methods Introduction If the Original Complex is a and the New Complex is b:
####Method:add() Adds a real or complex number
a.add.(b);
####Method:sub() Subtracts a real or complex number
a.sub.(b);
####Method:mul() Multiplies the real or complex number with a real or complex number
a.mul(b);
####Method:div() Divides the real or complex number by a real or complex number
a.mul(b);
####Method:exp() Calculates the e^a where the base is E and the exponential the complex number.
a.exp()
####Method:ln() Returns the natural logarithm (base E)
a.ln()
####Method:tostr() Returns a string representation of the complex number
a.tostr();