Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/version.js
  • Loading branch information
josdejong committed Jan 12, 2024
2 parents 1f1b74b + 0cbecec commit 6e37ac5
Show file tree
Hide file tree
Showing 13 changed files with 520 additions and 1,005 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -236,5 +236,6 @@ Praise Nnamonu <[email protected]>
Vincent Tam <[email protected]>
Juan Pablo Alvarado <[email protected]>
Brooks Smith <[email protected]>
Alex Edgcomb <[email protected]>

# Generated by tools/update-authors.js
8 changes: 8 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# History


# 2024-01-12, 12.3.0

- Implement support new metric prefixes: `ronna` (`R`), `quetta` (`Q`),
`ronto` (`r`), and `quecto` (`q`) (#3113, #3112). Thanks @AlexEdgcomb.
- Fix a bug converting a unitless unit (#3117). Thanks @costerwi.
- Fix: #3097 `toSI()` wrongly converting `degC` (#3118). Thanks @costerwi.


# 2023-12-20, 12.2.1

- Fix #3109: method `Node.toHTML` not accepting a custom `handler`.
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
math.js
https://github.com/josdejong/mathjs

Copyright (C) 2013-2023 Jos de Jong <[email protected]>
Copyright (C) 2013-2024 Jos de Jong <[email protected]>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ Math.js is an extensive math library for JavaScript and Node.js. It features a f
[![Version](https://img.shields.io/npm/v/mathjs.svg)](https://www.npmjs.com/package/mathjs)
[![Downloads](https://img.shields.io/npm/dm/mathjs.svg)](https://www.npmjs.com/package/mathjs)
[![Build Status](https://github.com/josdejong/mathjs/workflows/Node.js%20CI/badge.svg)](https://github.com/josdejong/mathjs/actions)
[![Maintenance](https://img.shields.io/maintenance/yes/2023.svg)](https://github.com/josdejong/mathjs/graphs/commit-activity)
[![Maintenance](https://img.shields.io/maintenance/yes/2024.svg)](https://github.com/josdejong/mathjs/graphs/commit-activity)
[![License](https://img.shields.io/github/license/josdejong/mathjs.svg)](https://github.com/josdejong/mathjs/blob/master/LICENSE)
[![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)
[![Codecov](https://codecov.io/gh/josdejong/mathjs/branch/develop/graph/badge.svg)](https://codecov.io/gh/josdejong/mathjs)
[![Github Sponsor](https://camo.githubusercontent.com/7d9333b097b2f54a8957d126ab82937811489c9b75c3850f609985cf94cd29fe/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2532302d53706f6e736f722532306d652532306f6e2532304769744875622d6f72616e6765)](https://github.com/sponsors/josdejong)
[![Github Sponsor](https://img.shields.io/github/sponsors/josdejong
)](https://github.com/sponsors/josdejong)

## Features

Expand Down Expand Up @@ -194,7 +195,7 @@ Thanks Github Actions and BrowserStack for the generous free hosting of this ope

## License

Copyright (C) 2013-2023 Jos de Jong <[email protected]>
Copyright (C) 2013-2024 Jos de Jong <[email protected]>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* cat script.txt | mathjs > results.txt Run input stream, output to file
*
* @license
* Copyright (C) 2013-2023 Jos de Jong <[email protected]>
* Copyright (C) 2013-2024 Jos de Jong <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down
8 changes: 6 additions & 2 deletions docs/datatypes/units.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ units on the page [Syntax](../expressions/syntax.md#units).
You can add your own units to Math.js using the `math.createUnit` function. The following example defines a new unit `furlong`, then uses the user-defined unit in a calculation:

```js
math.createUnit('furlong', '220 yards')
math.createUnit('furlong', '220 yards')
math.evaluate('1 mile to furlong') // 8 furlong
```

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:

```js
// A 'foo' cannot be expressed in terms of any other unit.
math.createUnit('foo')
math.createUnit('foo')
math.evaluate('8 foo * 4 feet') // 32 foo feet
```

Expand Down Expand Up @@ -338,6 +338,8 @@ peta | P | 1e15
exa | E | 1e18
zetta | Z | 1e21
yotta | Y | 1e24
ronna | R | 1e27
quetta | Q | 1e30

Name | Abbreviation | Value
------ | ------------- | -----
Expand All @@ -351,6 +353,8 @@ femto | f | 1e-15
atto | a | 1e-18
zepto | z | 1e-21
yocto | y | 1e-24
ronto | r | 1e-27
quecto | q | 1e-30

The following binary prefixes are available.
They can be used with units `bits` (`b`) and `bytes` (`B`).
Expand Down
Loading

0 comments on commit 6e37ac5

Please sign in to comment.