Skip to content

Commit 3fd6a0e

Browse files
authored
Merge pull request #6 from josdejong/develop
Sync
2 parents c803272 + af42bb5 commit 3fd6a0e

File tree

37 files changed

+3349
-1449
lines changed

37 files changed

+3349
-1449
lines changed

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: josdejong

HISTORY.md

+47-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,55 @@
11
# History
22

33

4-
# not yet published, version 6.2.2
4+
# 2020-01-08, version 6.5.0
55

6+
- Implemented `baseName` option for `createUnit`, see #1707.
7+
Thanks @ericman314.
8+
9+
10+
# 2020-01-06, version 6.4.0
11+
12+
- Extended function `dimension` with support for n-dimensional points.
13+
Thanks @Veeloxfire.
14+
15+
16+
# 2019-12-31, version 6.3.0
17+
18+
- Improved performance of `factorial` for `BigNumber` up to a factor two,
19+
see #1687. Thanks @kmdrGroch.
20+
21+
22+
# 2019-11-20, version 6.2.5
23+
24+
- Fixed `IndexNode` using a hardcoded, one-based implementation of `index`,
25+
making it impossible to instantiate a zero-based version of the expression
26+
parser. See #782.
27+
28+
29+
# 2019-11-20, version 6.2.4
30+
31+
- Fixed #1669: function 'qr' threw an error if the pivot was zero,
32+
thanks @kevinkelleher12 and @harrysarson.
33+
- Resolves #942: remove misleading assert in 'qr'. Thanks @harrysarson.
34+
- Work around a bug in complex.js where `sign(0)` returns complex NaN.
35+
Thanks @harrysarson.
36+
37+
38+
# 2019-10-06, version 6.2.3
39+
40+
- Fixed #1640: function `mean` not working for units. Thanks @clintonc.
41+
- Fixed #1639: function `min` listed twice in the "See also" section of the
42+
embedded docs of function `std`.
43+
- Improved performance of `isPrime`, see #1641. Thanks @arguiot.
44+
45+
46+
# 2019-09-23, version 6.2.2
47+
48+
- Fixed methods `map` and `clone` not copying the `dotNotation` property of
49+
`IndexNode`. Thanks @rianmcguire.
50+
- Fixed a typo in the documentation of `toHTML`. Thanks @maytanthegeek.
651
- Fixed #1615: error in the docs of `isNumeric`.
52+
- Fixed #1628: Cannot call methods on empty strings or numbers with value `0`.
753

854

955
# 2019-08-31, version 6.2.1

NOTICE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
math.js
22
https://github.com/josdejong/mathjs
33

4-
Copyright (C) 2013-2019 Jos de Jong <[email protected]>
4+
Copyright (C) 2013-2020 Jos de Jong <[email protected]>
55

66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Math.js is an extensive math library for JavaScript and Node.js. It features a f
88
[![Downloads](https://img.shields.io/npm/dm/mathjs.svg)](https://www.npmjs.com/package/mathjs)
99
[![Build Status](https://img.shields.io/travis/josdejong/mathjs/master.svg)](https://travis-ci.org/josdejong/mathjs)
1010
[![Greenkeeper badge](https://badges.greenkeeper.io/josdejong/mathjs.svg)](https://greenkeeper.io/)
11-
[![Maintenance](https://img.shields.io/maintenance/yes/2019.svg)](https://github.com/josdejong/mathjs/graphs/commit-activity)
11+
[![Maintenance](https://img.shields.io/maintenance/yes/2020.svg)](https://github.com/josdejong/mathjs/graphs/commit-activity)
1212
[![License](https://img.shields.io/github/license/josdejong/mathjs.svg)](https://github.com/josdejong/mathjs/blob/master/LICENSE)
1313
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjosdejong%2Fmathjs.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjosdejong%2Fmathjs?ref=badge_shield)
1414
[![Slack](https://slack.bri.im/badge.svg)](https://slack.bri.im)
@@ -146,7 +146,7 @@ Thanks Travis CI and BrowserStack for the generous free hosting of this open sou
146146

147147
## License
148148

149-
Copyright (C) 2013-2019 Jos de Jong <[email protected]>
149+
Copyright (C) 2013-2020 Jos de Jong <[email protected]>
150150

151151
Licensed under the Apache License, Version 2.0 (the "License");
152152
you may not use this file except in compliance with the License.

bin/cli.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* cat script.txt | mathjs > results.txt Run input stream, output to file
3131
*
3232
* @license
33-
* Copyright (C) 2013-2019 Jos de Jong <[email protected]>
33+
* Copyright (C) 2013-2020 Jos de Jong <[email protected]>
3434
*
3535
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
3636
* use this file except in compliance with the License. You may obtain a copy

docs/datatypes/units.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ math.createUnit('furlong', '220 yards')
115115
math.evaluate('1 mile to furlong') // 8 furlong
116116
```
117117

118-
If you cannot express the new unit in terms of any existing unit, then the second argument can be omitted. In this case, a new base unit is created:
118+
If you cannot express the new unit in terms of any existing unit, then the second argument can be omitted. In this case, a new *base unit* is created:
119119

120120
```js
121121
// A 'foo' cannot be expressed in terms of any other unit.
@@ -129,6 +129,7 @@ The second argument to `createUnit` can also be a configuration object consistin
129129
* **prefixes** A `string` indicating which prefixes math.js should use with the new unit. Possible values are `'none'`, `'short'`, `'long'`, `'binary_short'`, or `'binary_long'`. Default is `'none'`.
130130
* **offset** A value applied when converting to the unit. This is very helpful for temperature scales that do not share a zero with the absolute temperature scale. For example, if we were defining fahrenheit for the first time, we would use: `math.createUnit('fahrenheit', {definition: '0.555556 kelvin', offset: 459.67})`
131131
* **aliases** An array of strings to alias the new unit. Example: `math.createUnit('knot', {definition: '0.514444 m/s', aliases: ['knots', 'kt', 'kts']})`
132+
* **baseName** A `string` that specifies the name of the new dimension in case one needs to be created. Every unit in math.js has a dimension: length, time, velocity, etc. If the unit's `definition` doesn't match any existing dimension, or it is a new base unit, then `createUnit` will create a new dimension with the name `baseName` and assign it to the new unit. The default is to append `'_STUFF'` to the unit's name. If the unit already matches an existing dimension, this option has no effect.
132133

133134
An optional `options` object can also be supplied as the last argument to `createUnits`. Currently only the `override` option is supported:
134135

@@ -145,7 +146,8 @@ For example:
145146
```js
146147
math.createUnit( {
147148
foo: {
148-
prefixes: 'long'
149+
prefixes: 'long',
150+
baseName: 'essence-of-foo'
149151
},
150152
bar: '40 foo',
151153
baz: {

docs/expressions/expression_trees.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ All nodes have the following methods:
141141
142142
```js
143143
const node = math.parse('sqrt(2/3)')
144-
node.toString()
144+
node.toHTML()
145145
// returns
146146
// <span class="math-function">sqrt</span>
147147
// <span class="math-paranthesis math-round-parenthesis">(</span>

0 commit comments

Comments
 (0)