1595 Commits

Author SHA1 Message Date
jos
e6c5df5af5 Fix merge conflicts in row+column PR 2019-03-21 21:51:05 +01:00
SzechuanSage
dcbb7483de Add parse tests for row and column functions 2019-03-21 22:30:47 +10:00
SzechuanSage
8090297271 Flatten mocha tests for row and column functions 2019-03-21 21:56:49 +10:00
bnlcas
0db42306ec Extend std var for variable dimensions request 999 (#1444)
* initial implementation of multidimensional std and var

* consolidated std function into var, cleaned up the interface for var, fixed bias correction

* added documentation of variable axis for std and var

* updated documentation for std and var

* changed the order of normalization and dimension for a three parameter input in the functions

* updated documentation for var and std

* add transform expressions for std and var with variable axis

* added test coverage for std and var with a variable axis

* update to documentation

* change n dim std to use apply function

* fixed tests, removed unnecessary code, updated docs

* fixed typo in docs

* update docs to remove a type

* changed location of apply function

* updated tests to use deepStrictEqual to pass linter

* adding test coverage for var.transform and std.transform
2019-03-20 15:21:55 +01:00
bnlcas
128ed3cd9f Create apply utility request 1359 (#1411)
* add placeholder for apply function

* added apply function

* add test coverage for apply utility

* stylsitic name change in apply source code

* stylistic format change to test

* improved description of function parameters

* moved the apply function to the public matrix functions

* update location and reference of unit test

* fixed function reference paths in apply for location in function

* changed path to apply in apply.test

* make apply a typed function, update unit test

* added typing error test to coverage

* remove apply.test.js from the utils test function

* added transform function for apply

* add unit test for apply.transform.js
2019-03-17 20:15:38 +01:00
SzechuanSage
ac243e0d34 Revert constructor test with SparseMatrix 2019-03-12 19:35:12 +10:00
Jos de Jong
f9201affba
Merge branch 'develop' into develop 2019-03-10 16:33:12 +01:00
Eric Mansfield
30b45d8633 Fuzzy range endpoint (#1434)
* Fixed unit base recognition and formatting for user-defined units

* Began writing tests for range

* Use fuzzy comparisons for detecting range endpoint
2019-03-10 13:39:13 +01:00
Eric Mansfield
c0ca6da6a4 Gracefully handle round-off errors in fix, ceil, and floor (#1432)
* Fixed unit base recognition and formatting for user-defined units

* Manually copied work from another branch

* Removed semicolons

* Replaced assert.equal with assert.strictEqual

* Added support for bignumber

* Replaced var with const
2019-03-10 13:36:50 +01:00
SzechuanSage
f7364372fb Merge branch 'develop' of https://github.com/SzechuanSage/mathjs into develop 2019-03-08 23:56:31 +10:00
SzechuanSage
91f58eefdb Remove row and function method tests from matrix tests 2019-03-08 22:57:35 +10:00
SzechuanSage
4823dcdce1 Fix row and column function tests to use row and column functions 2019-03-08 22:56:18 +10:00
SzechuanSage
6e1caa67dd Add tests for matrix functions row and column 2019-03-08 22:26:56 +10:00
Chris Hadgis
a2af82612a
Merge branch 'develop' into develop 2019-03-03 00:35:08 +10: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 de Jong
d2767e3662
Merge branch 'develop' into develop 2019-03-02 09:34:27 +01:00
jos
d9deed993d Fixed #1418: missing whitespace when stringifying an expression containing "not" 2019-02-27 17:49:35 +01:00
jos
70cbc3ec30 Replace http urls with https where supported 2019-02-27 13:08:42 +01:00
SzechuanSage
971268d302 Merge branch 'develop' of https://github.com/SzechuanSage/mathjs into develop 2019-02-24 17:01:14 +10:00
SzechuanSage
66b4259da4 Add unit test for validation in row and column functions 2019-02-24 17:00:46 +10:00
SzechuanSage
e8f2f6ac20 Add row and column functions for DenseMatrix 2019-02-24 14:43:39 +10:00
Jos de Jong
4441ac3c68
Merge branch 'develop' into develop 2019-02-23 16:04:18 +01:00
jos
7d00987a3f Fix #1404: inconsistent rounding of negative numbers 2019-02-20 16:54:10 +01:00
jos
69acb4f42a Fix #1401: bug in map and forEach of SparseMatrix not handling unordered indexes correctly 2019-02-20 16:32:28 +01:00
SzechuanSage
6267b6b8ac Add row and column functions for SparseMatrix 2019-02-20 20:22:08 +10:00
Harry Sarson
64de7e77a8 Use codecov to monitor code coverage (#1408) 2019-02-16 14:53:25 +01:00
Jos de Jong
6f92201e18 Fixed #1389: one unit test failing on Windows 2019-01-28 22:23:08 +01:00
jos
420446452b Fixed a bug the methods map, forEach, traverse, and transform
of `FunctionNode`
2019-01-25 22:27:59 +01:00
Eric Mansfield
aa68442238 Bignumber formatter fix (#1387)
* Fixed unit base recognition and formatting for user-defined units

* Fix for high precision bignumber formatting
2019-01-21 21:14:29 +01:00
Rian McGuire
00d6101da3 Fix incorrect LaTeX output of RelationalNodes (#1383)
The parameters were being output using toString(), rather than toTex().
2019-01-16 15:03:07 +01:00
jos
0721626422 Fix #1378: negative bignumbers not formatted correctly 2019-01-08 20:27:59 +01:00
bnlcas
e45c8805b3 Add axis for sum request 1244 (#1310)
* enable sum function to take an argument of dimension for a matrix fulfilling issue #1244

* added sum along a dimension to the unit test coverage for sum

* added information about sum along a dimension to the markdown

* fixed typo in error message

* made formatting chagnes for linter

* add sum to transformed functions
2018-12-09 13:09:36 +01:00
Gold Holk
2032a9d126 Fix object literal enable multiple lines (#1328) (#1349)
* Allow object literal expression be multiple lines

* Add test for multiple lines object literal
2018-12-06 19:37:57 +01:00
Eric Mansfield
6c03139ac8 Immutable units (#1344)
* Fixed unit base recognition and formatting for user-defined units

* Removed side effects from Unit.format()

* minor fix
2018-12-05 10:11:52 +01:00
Eric Mansfield
92c58d92d0 Fix prefix tosi (#1340)
* Fixed unit base recognition and formatting for user-defined units

* Fixes prefix when calling Unit.toSI

* trailing space
2018-12-03 19:43:43 +01:00
dkenul
30e1bfc9d2 Fix #1337: function format precision 0 bug (#1338) 2018-11-29 20:08:41 +01:00
jos
d0b1b5401a Disable unit tests of functionality not supported on IE11 (see #1303) 2018-11-04 20:51:51 +01:00
Sathish-kumar-Subramani
3cbe1e05ef add util function hasNumericValue (#1303)
* add util function hasNumericValue

* hasNumericValue - add Number wrapper object. add more test cases.

* hasNumericValue - add test case to check if string with number, surrounded by whitespace is valid.
2018-11-03 10:08:45 +01:00
jos
5b6863e364 Fixed #1304: function pow not supporting inputs pow(Unit, BigNumber) 2018-10-30 20:13:15 +01:00
Max Bruckner
e09e1040c5 bitNot: Fix incorrect tilde in LaTeX output (#1302) 2018-10-29 21:25:49 +01:00
Eric Mansfield
0ce87a9920 Fixed unit base recognition and formatting for user-defined units (#1287) 2018-10-23 19:29:21 +02:00
jos
a715786690 Release v5.2.0 2018-10-05 21:25:21 +02:00
Eric Mansfield
aadb63ef3b Bugfix for bignumber divided by unit (#1270)
* Bugfix for bignumber divided by unit

* Expanded out numeric.js, improved divideScalar.js

* Minor comments
2018-10-05 20:53:49 +02:00
Eric Mansfield
d23d8c71a4 Chained conditionals (#1267)
* Minimally working

* Added tests, toString

* Added tests for evaluation

* Minor changes

* Added a line in the docs about chained conditionals

* Documentation, replacing var and let with const
2018-10-04 20:26:39 +02:00
Eric Mansfield
574c3b3428 Allow dimensionless units (#1251)
* Allow dimensionless units

* Fixed double quotes

* Fixed deepEqual

* FIxed for real this time
2018-09-15 21:09:24 +02:00
Harry Sarson
5750a18454 Upgrade to babel 7 (#1234) 2018-09-08 19:34:18 +02: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
jos
6085021d0c Fix more unit tests broken on Nodejs 6 and 8 (no proper NaN assertions) 2018-08-21 21:32:22 +02:00
jos
56a52f6dfd Fix unit tests broken on Nodejs 6 and 8 (no proper NaN assertions) 2018-08-21 21:27:11 +02:00
jos
b6ab40cf88 Fixed #1214: median and other functions not neatly handling NaN 2018-08-21 21:16:15 +02:00