Releases: patrickroberts/complex-js
Optimized Compiler
This update has improved the performance of functions generated by Complex.parseFunction()
by attempting to compile sub-groups as constant expressions. For example:
(cos(0)+5i)*x
used to compile to the JavaScript
Complex.cos(Complex.ZERO).add(Complex(5,0).mult(Complex.I)).mult(x)
It now compiles simply to:
Complex(1,5).mult(x)
The compiler is now also case-sensitive, allowing differentiation between the variables a
and A
in an expression.
One minor update is the imaginary component of the Complex()
constructor is now optional.
Support for AMD and Bower
Can now be more readily included in client-side environments using bower
and/or requirejs
.
Updated Compiler
The compiler has been updated to provide stricter compilation with more informative errors, and a minor bug-fix involving a misinterpretation during the parsing of any group of numbers in exponential format. Other updates:
rDivBy
anddivBy
renamed torDiv
anddiv
respectfully- symbolic operators added
Runs in Strict Mode
This release now runs the library in strict mode for higher performance. The real operators rAdd
, rSub
, rMult
, rDivBy
, rMod
, and rPow
have been added. Two changes are NOT backwards compatible:
pow
is renamed torPow
cPow
is renamed topow
Updated the name of constants and cleaned compiler
Though the previous release (1.1.1) is completely stable, this version has completely reformatted the code to be significantly more readable. One major update that is NOT backwards compatible:
- Some Complex constants have been renamed
Added Convenience Methods and Improved Code Readability
Added Methods
Complex.prototype.equals
Complex.prototype.real
Complex.prototype.imag
Complex.prototype.abs
Complex.prototype.arg
Complex.norm
Complex.iPart
Removed with
statement from Complex.parseFunction
Removed all continue
statements
Added explicit block statements for all one-line if
, else
, for
, and while
statements to clarify control-flow
Polished Documentation
Documentation has been updated in uncompressed file to more standardized format. toString method now optimizes display of cartesian output.
1.0.11
Updated float parsing rules and added gamma and factorial functions to the library. Also stabilized generated function scopes in Node.js environment.
1.0.0
v1.0.0 Updated markdown