Favian Contreras
e73df48938
Removed fail test case for now functioning token '~'. Added test cases for it as well.
2014-12-15 04:00:52 -08:00
Favian Contreras
f36fbb3968
Added bitwise functions into the bignumber section of mathjs. Made more test cases as well. Shifts are not fully precise, but other bitwise opts are.
2014-12-15 01:02:41 -08:00
jos
fa23462969
Merge remote-tracking branch 'origin/develop' into develop
2014-12-14 14:02:25 +01:00
Jos de Jong
77e32bbdd8
Merge pull request #247 from pavpanchekha/complex-trig-accuracy
...
Accuracy of sinh and complex cos/sin
2014-12-14 14:02:07 +01:00
jos
05cb69f6da
Converting a unit without value will now result in a unit *with* value
2014-12-14 13:35:17 +01:00
Pavel Panchekha
e51bb94d56
Fix the test case so it passes on all hardware.
...
The fix is to test that the imaginary part is nonzero,
not that it is exactly 1e-100.
In some software / hardware combos,
it seems to return 1.0000000000000001e-100.
2014-12-14 00:42:45 -08:00
Favian Contreras
9a25f8c467
Merge branch 'develop' of https://github.com/josdejong/mathjs into develop
2014-12-13 23:50:47 -08:00
Favian Contreras
33d76576d5
Updated use of bigPi, and adjusted the test cases as well.
2014-12-13 10:38:09 -08:00
Favian Contreras
9cc5161f35
Merge branch 'develop' of https://github.com/josdejong/mathjs into gamma_factorial
2014-12-13 06:51:44 -08:00
jos
fd586fcbf1
Moved bignumber functions e, pi, tau, phi to util/bignumber.js (see #226 )
2014-12-13 14:14:33 +01:00
Pavel Panchekha
c3a7410a9a
Add tests for calling sin and cos on very small inputs.
2014-12-12 12:14:28 -08:00
Favian Contreras
3ca7d8e57b
No longer change the config state; now using new created state in test cases.
2014-12-11 11:20:47 -08:00
Favian Contreras
ea83be53c4
The tests now work, but still have use Math.PI.
2014-12-11 10:51:34 -08:00
Favian Contreras
5bc3e0d8c2
Faster factorial, and gamma implemented with tests.
2014-12-11 07:20:13 -08:00
Favian Contreras
632eba954a
Uncommented bignumber portions, and added bignumber test cases.
2014-12-09 12:53:41 -08:00
Favian Contreras
38fd1c6315
Add test cases to reflect previous error while using parseInt instead of unary plus; added test cases that included strings in scientific notation.
2014-12-08 10:31:06 -08:00
Favian Contreras
57079969e3
Renamed xor, removed string NaN failure (undefined behavior should be handled by js), and prohibited use of Units.
2014-11-27 06:16:37 -08:00
Favian Contreras
a6fa55122d
Finished testing, and renamed some of the ops to avoid any future confusion with boolean ops.
2014-11-26 06:37:27 -08:00
Favian Contreras
37fe86d251
Finished successfully testing the and, or, xor trio.
2014-11-26 03:19:43 -08:00
Favian Contreras
3f94a673bd
First "fully" tested function! (and.js)
2014-11-26 02:48:10 -08:00
Favian Contreras
b4fdea0341
Basic functionality for most bitwise functions, but only minor testing. Shifts not done yet.
2014-11-25 02:45:11 -08:00
Andy Pan
1ccc20802b
Merge branch 'develop' of https://github.com/josdejong/mathjs into upstream-dev
2014-11-22 21:09:59 +08:00
jos
da03cd5be9
Fixed #238 : Unit divided by Number returning zero
2014-11-22 13:54:38 +01:00
Andy Pan
a4fa88c4e3
modify test corresponding to the previous commit
2014-11-22 17:52:28 +08:00
jos
a61397cfc6
Fixed #236 : BigNumber downgrading to Number for a negative base in pow
2014-11-21 11:16:09 +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
bc15efbc68
Fixed #219 : implemented function nthRoot
2014-11-09 14:18:30 +01:00
jos
8f37893c61
Implemented function cross (cross product for vectors).
2014-11-08 17:57:51 +01:00
jos
50fb91346b
Implemented function dot (dot product for vectors).
2014-11-08 16:13:32 +01:00
jos
db60d95438
Fixed 2e giving a syntax error instead of being parsed as 2 * e (see #229 )
2014-11-08 15:27:22 +01:00
jos
374759a84e
types.type now also recognizes a function
2014-10-19 20:37:27 +02:00
jos
7132a6f3c2
Fixed #221 for one-based implementations of map and forEach
2014-10-14 09:03:04 +02:00
jos
02d4d1d819
Fixed #221 : Parameter index in the callbacks of map and forEach are now cloned for every callback
2014-10-13 21:53:55 +02:00
jos
bd1981ecd0
Renamed Node.map and Node.forEach back to traverse and transform
2014-10-13 21:42:48 +02:00
jos
238281e28a
Renamed traverse and transform to forEach and map
2014-10-12 19:32:51 +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
1a360b6995
Merge branch 'develop'
2014-09-04 21:28:01 +02:00
jos
f1313d8be7
Implemented a function filter(x, test)
2014-09-04 20:52:51 +02:00