151 Commits

Author SHA1 Message Date
jos
ab1b83a2f6 Remove generated files from repo, make tests independent from generated files 2019-05-12 15:14:13 +02:00
jos
427c39c33b Created ES5 and ES6 entry points 2019-04-28 20:56:08 +02:00
jos
f4d4180cea Move all entry files under ./src/entry 2019-04-24 10:48:01 +02:00
jos
6081360d6a Merged develop into modular_architecture 2019-04-13 16:51:51 +02:00
sam-19
9bfdff1d06 Support pow() as an argument for derivative() (#1417)
* Support pow() as an argument for derivative()

Add support for the pow() function as an argument for math.derivative().

Fixes #1259.

* Unit tests for derivatives of pow()

* Support for derivate of pow() function
2019-03-02 10:37:43 +01:00
jos
99da53da0e Flatten everything in a mathjs instance to make it consistent with the ES6 exports. Create deprecation warnings for the old classes and functions 2019-02-07 21:24:51 +01:00
jos
c42844a5d8 Flatten all type.* dependencies 2019-01-30 13:47:45 +01:00
jos
078f1dd69f Renamed methods .eval to .evaluate, updated all docs and examples accordingly 2019-01-16 10:11:32 +01:00
jos
5dd0a9ba9c Get bundle working (with lazy loading) 2019-01-02 10:03:05 +01:00
jos
4b3561e426 Use math.evaluate everywhere in the unit tests 2018-12-05 12:22:21 +01:00
jos
19275e5eaa Moved all toTex properties to latex util file 2018-11-21 18:08:21 +01:00
jos
5597c5655d Remove dependency on math from simplify 2018-11-21 15:42:56 +01:00
jos
0bd3303211 Add some missing types in typed 2018-11-14 12:02:10 +01:00
jos
9faf91f697 Convert all data types, converted all algebra functions. Fixes in order of importing factories. 2018-11-08 15:02:18 +01:00
jos
2fd6cbd568 Converted matrix classes. Fixes in dependency resolving/ordering. 2018-11-07 12:38:00 +01:00
jos
a2ae756fd1 Remove semicolons 2018-10-31 21:18:51 +01:00
jos
247aeabffa Refactor all unit tests to ES6 import/export 2018-10-31 21:17:23 +01:00
greenkeeper[bot]
c5971b371a Update standard to the latest version 🚀 (#1226)
* chore(package): update standard to version 12.0.0

* update to new lint version with --fix

I believe this mainly adds whitespace to `{}`'s.

* Replace assert.equal with assert.strictEqual

This breaks a lot of tests which I will endevour to fix in the next
commits.

* Fix most errors due to assert.strictEquals

Some instances of `strictEquals` are replaced by `deepEquals`.
`toString` has been used to make some string comparisions explicit.
Tests will still fail untill #1236 and #1237 are fixed.

* Fix assertion erros due to -0

With node 10, assert.strictEqual no longer considers `0 === -0`.
I missed these first time round as I was using node 8.

* Put toString correct side of bracket

I was converting the constructor to a string rather
than the result of the computation. Oops.

* Fixed #1236: quantileSeq has inconsistant return

* Update package-lock

* Fixed #1237: norm sometimes returning a complex number instead of number

* Fix cli tests

* More changes for standardjs, and fixes in unit tests
2018-09-08 16:33:58 +02:00
Paulo Buchsbaum
443d42a7fc Bugfixes in rationalize, extended simplify with new options see #1173
Fix of bug fixes in `rationalize.js`, also changing  `simplify.js` and `simplifyConstant.js` and more  2 bugs in `simplify.js` and `simplifyconstant.js` in order to be possible passing in `Travis` test. 

**Bugs in `simplifyConstant.js` and   `simplify.js`**

1. `simplifyConstant.js` - I've changed `new ConstantNode(stringNumber, 'number')` to `new ConstantNode(number)`

1.  `simplify.js` - Due to problems with a  number node with  string type,  I've added `!isNaN(node.value)))` in number type test condition 

**Bugs in `rationalize.js`**

3.   I've fixed  negative power exponents and decimals coefficients troubles. The decimals coefficients problem has led to the need to add a new feature in `simplify.js ` and `simplifyConstant.js` (next topic)

**New feature in `simplify.js` and `simplifyConstant.js`**

4.  New rule type (string), whose valid values are in `listCommStrings` new variable. The only string rule accepted so far is to turn off exact fraction conversion in `simplifyConstant.js`
2018-08-03 15:58:45 +02:00
jos
e04d158eaa Some larger timeouts for tests to prevent accidental failure on IE/Edge 2018-07-07 13:21:18 +02:00
jos
c3827d7411 Fixed #1137: simplify unnecessarily replacing implicit multiplication with explicit multiplication 2018-07-06 22:17:43 +02:00
jos
a9b9ed029e Merge branch 'develop' into fix/simplify_implicit_multiplication 2018-07-06 21:00:40 +02:00
jos
0d93fff878 Fixed #1146: rationalize throwing exceptions for some input with decimals 2018-07-04 21:06:55 +02:00
jos
06dda6fc95 Fix keeping implicit multiplication in simplify (WIP) 2018-07-01 15:10:43 +02:00
Harry Sarson
61396e54cc
remove timeout extension from rationalize test 2018-06-19 16:28:31 +01:00
Harry Sarson
815cade14c
speed up rationalize tests
This commit tests the processing of power expressions using a smaller exponent (3 vs 6) and
moves a particulary slow expandsion into a seperate test which is then skipped.
2018-06-19 16:28:13 +01:00
jos
9170e27618 Don't use multi line strings 2018-06-13 17:59:33 +02:00
jos
0583771e4e Cleanup unused variables and imports 2018-06-13 17:25:51 +02:00
jos
f1ce473457 Consistend camel case naming of variables and functions 2018-06-13 16:09:51 +02:00
jos
1f0a37a0cb Split initialized 'const' declarations into multiple statements 2018-06-13 15:31:37 +02:00
jos
17f07ec098 Fixed incompatibility with v4 (index.js file) 2018-06-13 14:02:50 +02:00
jos
b3b96749bf Refactored var into const/let, and removed a lot of semicolons 2018-06-13 12:21:14 +02:00
jos
934ea83df7 Fixed linting issues "Expected consistent spacing" 2018-06-12 21:38:11 +02:00
jos
024b2a9e26 Fix most lint errors using npx standard --fix 2018-06-10 20:28:27 +02:00
jos
b3568a4c4a Merge branch 'fix-derivative-tex' of https://github.com/joelhoover/mathjs into joelhoover-fix-derivative-tex 2018-06-10 14:08:56 +02:00
Joel Hoover
6722b448d1 Merge branch 'develop' into fix-derivative-tex 2018-06-07 21:43:20 -04:00
Joel Hoover
d2164c4fc5 Properly handle TeXing of 'derivative', and added test cases for regression (fixes josdejong/mathjs#1103) 2018-06-07 21:39:16 -04:00
jos
635cd0b574 Revert using /lib/ in tests, use /src/ again. Fixed coverage testing. WIP 2018-06-06 22:11:52 +02:00
jos
79071b5e4f Fixed npm run test:browser not working (WIP) 2018-06-06 21:30:41 +02:00
jos
0c084b8e20 npm test working now 2018-06-06 15:36:36 +02:00
jos
cf5c1c1af8 Fixes #1054: renamed eye to identity 2018-06-06 10:52:08 +02:00
Harry Sarson
29052cbdcc
use math.create() to prevent tests changing global state.
Tests should not import functions into global math namespace.
2018-05-01 17:40:57 +01:00
Harry Sarson
c23761bee0
separate tests that depend on node
Ddds new directory 'test/node' for tests which require node.
In practice these tests are the ones that depend on matrixmarket.
2018-05-01 17:38:51 +01:00
jos
229ff3d8ff Fixed #1063: derivative not working when resolving a variable with unary minus like math.derivative('-x', 'x') 2018-04-11 13:25:44 +02:00
jos
bf3f62b564 Upgraded to typed-function@1.0.0 2018-02-20 20:59:05 +01:00
jos
99ab11b234 Dropped constant uninitialized 2018-02-04 13:09:09 +01:00
Jos de Jong
cdda817d9f
Merge pull request #1036 from ericman314/implicit-multiplication
Implicit multiplication
2018-02-04 11:55:15 +01:00
Eric Mansfield
17a4e33ae2 Added tests 2018-02-02 21:14:33 -07:00
jos
82b41e696a - Implemented OperatorNode.isUnary and OperatorNode.isBinary.
- Explicit checks for number of arguments everywhere working with `OperatorNode` and `FunctionNode`.
- Fixed #1014: derivative silently ignoring additional arguments.
2018-01-31 11:00:39 +01:00
jos
3f3d50f7a0 Fixed #833: the constants true, false, null, undefined, NaN, Infinity, and uninitialized are now parsed as ConstantNodes instead of SymbolNodes in the expression parser 2018-01-23 13:55:57 +01:00