51 Commits

Author SHA1 Message Date
josdejong
f9446875df Function multiply now consistently outputs a complex number on complex input 2013-11-30 10:08:37 +01:00
josdejong
9338e0a4ec All arithmetic functions can now handle mixed complex numbers, big numbers, and units 2013-11-28 11:41:18 +01:00
josdejong
9566218b12 Function add can now handle mixed complex and big numbers 2013-11-27 15:21:02 +01:00
josdejong
8761910b75 Fixed a bug in collection.deepMap2 2013-11-26 20:45:39 +01:00
josdejong
b3812362fd Implemented bignumber downgrading for all not-supported functions 2013-11-23 14:14:44 +01:00
josdejong
4a99e03055 All arithmetic functions not supporting BigNumbers downgrade BigNumbers to Numbers 2013-11-23 10:55:39 +01:00
josdejong
26c0332883 On mixed Number/BigNumber inputs, all operators now downgrade the inputs if Number is a fraction. 2013-11-23 10:28:42 +01:00
josdejong
21e4f7f160 Neatly splitted calculations with Numbers and Booleans 2013-11-19 21:34:20 +01:00
josdejong
ac41566de8 Wrapped all bignumber functions available in the bignumber.js library 2013-11-16 17:49:16 +01:00
josdejong
52337e4b94 Integrating the bignumber.js library in math.js. This is awesome! 2013-11-16 14:34:35 +01:00
josdejong
d2e55a0132 Math.js must be instantiated now, static calls are no longer supported 2013-10-26 15:00:06 +02:00
josdejong
c8a289a08c Removed unnecessary .js suffix in module require statements 2013-10-20 14:01:31 +02:00
josdejong
abff8efdbc Mixed matrix input now always returns a Matrix (needed to mace collection static) 2013-10-19 22:01:10 +02:00
josdejong
e61d2f965b Fixes in the new function math.format(precision). Updated docs and tests. 2013-10-19 21:44:54 +02:00
josdejong
a4bda611df Implemented function print (splitted from function format) 2013-10-19 18:10:50 +02:00
josdejong
3c7174c764 Renamed options to math.options.format.precision and math.options.matrix.defaultType 2013-10-19 15:00:32 +02:00
josdejong
eb9ffdeadf Removed support for comparing complex numbers 2013-10-17 14:49:30 +02:00
josdejong
c3d5edf4bb Implemented support for multiplying vectors with matrices 2013-10-14 13:14:16 +02:00
josdejong
c031a4248e Added a test with mixed matrix types 2013-10-08 16:30:06 +02:00
josdejong
5481b0a663 Introduced an option math.options.matrix.default which can have values matrix (default) or array. This option is used by the functions eye, ones, range, and zeros, to determine the type of matrix output. 2013-10-01 20:37:28 +02:00
josdejong
93d588f861 Added some more tests for gcd, lcm, xgcd 2013-09-22 09:43:18 +02:00
josdejong
2dc6ac6cdf Implemented support for booleans in all relevant functions 2013-09-02 21:36:52 +02:00
josdejong
6273ad998f Removed usage of math.eval from function unit tests 2013-08-31 10:53:14 +02:00
josdejong
7f58398053 Completed missing descriptions in tests 2013-08-19 21:07:45 +02:00
josdejong
e704c79e17 Removed the feature to automatically convert a complex
value with an imaginary part equal to zero to a number (see #59)
2013-08-14 14:41:35 +02:00
Sebastien Piquemal
a6b4ad7526 fixed tests 2013-08-14 15:43:32 +04:00
Sebastien Piquemal
aa0249d458 fixed npm install, changed src to lib 2013-08-14 15:00:12 +04:00
josdejong
d76602a2ee Changed syntax of range to range(start, end [, step]) 2013-08-09 22:33:58 +02:00
josdejong
aa471db411 Upperbound of range is now excluded 2013-08-09 22:09:46 +02:00
Sebastien Piquemal
1e7603488c refactored refactored tests/functions/arithmetic 2013-08-08 15:31:37 +04:00
josdejong
fe06d514e0 Created shared module math.js for all functions (resolves circular references) 2013-08-06 21:50:15 +02:00
josdejong
8cc9ceb980 Changed all source files into node.js modules 2013-08-05 23:05:23 +02:00
josdejong
d9f34677b4 Renamed all test files to *.test.js 2013-08-04 14:46:22 +02:00
josdejong
c5edb419d8 Moved the library builds math.js and math.min.js to subfolder dist 2013-08-04 14:39:42 +02:00
josdejong
6a6b5c3e61 Replaced all x instanceof Array with Array.isArray(x) 2013-08-04 14:30:38 +02:00
josdejong
19b507b9f0 Refactored all code to 2 space indentation 2013-08-04 14:07:47 +02:00
josdejong
881889dec0 Renamed unaryminus to unary 2013-07-08 14:11:42 +02:00
josdejong
76b154e285 Complex computations will return a (real) Number instead of Complex(x,0) when possible. 2013-06-16 14:46:42 +02:00
josdejong
7df862b7fa Made function multiply a little smarter in dealing with complex calculations and reducing complex results to a number when possible 2013-06-16 14:05:15 +02:00
josdejong
43cc541762 Fixed #14: wrong calculation of i/0, also fixed i*Infinity 2013-06-14 21:18:14 +02:00
josdejong
01400af0db Fixed Complex constructor not accepting NaN as parameter (see also issue 14) 2013-06-13 20:11:50 +02:00
josdejong
f2b1b2ad9f Implemented element wise functions edivide, emultiply, and epow 2013-05-31 20:47:45 +02:00
josdejong
0b2e28403b Fixed in mod for negative numerators. Added more input validation. Added tests 2013-05-29 20:14:51 +02:00
josdejong
f010032683 Updated version to 0.8.2-SNAPSHOT 2013-05-17 18:37:35 +02:00
josdejong
f93dcfbc44 More tests 2013-05-10 21:53:05 +02:00
josdejong
738bd1350f More tests 2013-05-07 22:06:36 +02:00
josdejong
922e12073b Implemented command line interface. soo coool. 2013-05-06 22:25:00 +02:00
josdejong
84552d133e More tests 2013-05-06 21:54:57 +02:00
josdejong
30274bfec8 Few more tests and type checks 2013-05-05 21:07:25 +02:00
josdejong
9f91213ea6 Fixed non-working unequal operator != in the parser 2013-05-05 20:22:59 +02:00