mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif
51 lines (32 loc) • 1.06 kB
Markdown
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
simplifyCore() performs single pass simplification suitable for
applications requiring ultimate performance. In contrast, simplify()
extends simplifyCore() with additional passes to provide deeper
simplification.
## Syntax
```js
simplifyCore(expr)
```
### Parameters
Parameter | Type | Description
--------- | ---- | -----------
`node` | Node | The expression to be simplified
`options` | Object | Simplification options, as per simplify()
### Returns
Type | Description
---- | -----------
Node | Returns expression with basic simplifications applied
### Throws
Type | Description
---- | -----------
## Examples
```js
const f = math.parse('2 * 1 * x ^ (2 - 1)')
math.simpifyCore(f) // Node {2 * x}
math.simplify('2 * 1 * x ^ (2 - 1)', [math.simplifyCore]) // Node {2 * x}
```
[](simplify.md),
[](resolve.md),
[](derivative.md)