Jos de Jong
4669542079
Merge pull request #277 from FSMaxB/totex-fix
...
Fix missing brackets in LaTeX output (bug #273 )
2015-02-20 12:41:41 +00:00
jos
70a476c357
Replaced all require('decimal.js') with require('../type/BigNumber'), containing the toJSON and fromJSON methods for BigNumber
2015-02-18 20:41:27 +01:00
Max Bruckner
183d15fcfe
OperatorNode: remove unnecessary elseif
2015-02-14 02:36:57 +01:00
Max Bruckner
bbe22a9055
fix: no brackets with single operators (bug #273 )
...
* Use brackets after unary minus followed by an OperatorNode with + or -
- "-(a+b)", "-(a-b)"
* Use brackets in fron of postfix operators like '!' (for OperatorNode)
- "(a*b)!", "(a+b)!"
2015-02-14 02:36:38 +01:00
Max Bruckner
23b1890f7e
fix indentation of previous commit
2015-02-14 01:48:54 +01:00
Max Bruckner
9b6d7ead9f
Fix missing brackets in LaTeX output (bug #273 )
...
When creating the LaTeX output for expressions like 1-(1+1) or 1-(1-1),
the bracket's where missing.
2015-02-13 16:51:40 +01:00
jos
86bcd55352
Changed the way transforms are registered internally, making Node.compile faster, and enabling lazy-loading constants
2015-01-13 10:48:52 +01:00
jos
309bf3938d
Added proper error messages to Node.map
2014-11-15 13:32:02 +01:00
jos
9257ec3c33
Added unit tests for Node.map and Node.forEach
2014-11-15 13:16:32 +01:00
jos
5669ae1365
Some refactoring
2014-11-14 11:35:13 +01:00
jos
a1f60db0d1
Created Node.map, changed traverse to use Node.map
2014-11-14 11:25:48 +01:00
jos
20c96894ab
Enforcing implementation of _traverse on Nodes
2014-11-13 22:16:57 +01:00
jos
be9a8629ea
Node.transform does not create a clone of the tree anymore
2014-11-13 22:01:48 +01:00
jos
92627f2c94
Nodes for a BlockNode must now be passed via the constructor instead of via a function add
2014-11-13 21:54:41 +01:00
jos
423909e6f1
Changed constructor of RangeNode to new RangeNode(start: Node, end: Node [, step: Node]).
2014-11-13 21:25:37 +01:00
jos
72a1b03850
Documented expression tree API. Some internal refactoring in nodes.
2014-11-12 22:30:15 +01:00
jos
bd1981ecd0
Renamed Node.map and Node.forEach back to traverse and transform
2014-10-13 21:42:48 +02:00
jos
adf0b39a69
Fixed deprecated messages
2014-10-12 19:45:05 +02:00
jos
b4de2cb549
Some code reorganization
2014-10-12 19:37:02 +02:00
jos
238281e28a
Renamed traverse and transform to forEach and map
2014-10-12 19:32:51 +02:00
jos
ae588c9d93
Removed a todo
2014-10-11 22:30:52 +02:00
jos
ba70c07509
Added unit tests for Node.clone
2014-10-11 22:29:48 +02:00
jos
95a49fe156
Node.transform first clones the node tree
2014-10-11 21:59:47 +02:00
jos
839e596772
Implemented transform and traverse
2014-10-11 18:03:41 +02:00
jos
5f08307391
Implemented a function replace for nodes of a parsed expression.
2014-10-11 15:33:23 +02:00
jos
52a922e937
Fixed #210 : Disabled array notation for ranges in a matrix index the expression parser
2014-09-09 17:33:53 +02:00
jos
a172b52fdc
Renamed raw to rawArgs (see #207 )
2014-08-18 09:02:04 +02:00
jos
f23c87c4f7
renamed __transform__ to transform
2014-08-16 17:41:37 +02:00
jos
396777f724
Raw functions are now invoked as fn(args, math, scope)
2014-08-16 15:06:11 +02:00
jos
99fc9a0ead
Implemented support for raw functions
2014-08-16 12:13:57 +02:00
jos
e5d14ca3dd
Some refactoring of the FunctionNode
2014-08-16 11:13:24 +02:00
jos
8a12c8e9bc
Fixed #200 : A new instanceof of math.js must now be created as math.create([options]) instead of math([options])
2014-08-03 21:42:12 +02:00
jos
6b833a581c
Renamed FunctionNode to FunctionAssignmentNode, and renamed ParamsNode to FunctionNode for more clarity (see #203 )
2014-08-03 21:13:24 +02:00
jos
8200955d71
Removed unnecessary names of functions
2014-07-21 22:14:27 +02:00
jos
8c224d3e71
Moved transformation of error messages (zero-based to one-based) to the expression/transform section
2014-07-20 20:45:10 +02:00
jos
21b34cfa1a
Implemented transforms, moved all one-based to zero-based logic for expressions to transforms.
2014-07-19 21:47:15 +02:00
jos
40986a1325
Using strict mode now in all files (added 'use strict'; on top of every file)
2014-07-18 23:19:14 +02:00
jos
1a9ceac955
Multi-line expressions now return a ResultSet instead of an Array.
2014-07-18 21:34:37 +02:00
jos
4645529f40
Removed function ifElse
2014-06-30 14:52:54 +02:00
jos
5e1cfbf545
Implemented implicit multiplication. Fixed a bug with multiplying non-valued temperatures with a number
2014-06-30 13:43:50 +02:00
jos
a2a9651d14
Added some comments
2014-06-23 11:55:36 +02:00
jos
7c761e390a
Refactored ConstantNode to make it more flexible to various types of input
2014-06-23 11:51:01 +02:00
jos
7d84e4daf0
Math.js now immediately returns a default instance of mathjs, no need to create an instance every time you want to use the library.
2014-06-20 23:11:14 +02:00
jos
a9226ef70d
Fixed #187 : changed the behavior of the conditional operator (a ? b : c) to lazy evaluation.
2014-06-20 21:14:58 +02:00
jos
9f346f19bc
Changed signature of math.parse(expr, nodes) to math.parse(expr, options)
2014-06-10 21:35:06 +02:00
jos
2fe9f0d736
Fixed #151 : end is now a reserved keyword
2014-06-10 21:13:27 +02:00
Niels Heisterkamp
086e59061a
Fixed test and removed remaining console.log.
2014-05-19 20:32:25 +02:00
Niels Heisterkamp
12147b3bd4
Some tweaks and fixes
2014-05-19 19:27:42 +02:00
Niels Heisterkamp
b7fe0bfbf1
Added LaTeX conversion of expressions using toTex() on expression.
...
Also added some basic tests, which cover some use cases; but should be expanded.
2014-05-19 08:20:06 +02:00
jos
ae42bdd9a5
Fixed an implicit require path to an index file
2014-05-07 21:15:43 +02:00