# What changed in mathjs

> 12 changes in mathjs 15 from its official release notes, upgrade guides and advisories: 3 breaking, 4 new APIs and options. Each one cited. Sources checked 2026-10-26. HTML: https://unstale.sh/npm/mathjs/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## mathjs 15

### Breaking changes

- An empty true-expression in a conditional is interpreted as an error. (15.1.1) — [release notes](https://github.com/josdejong/mathjs/blob/ef44f12a37f6a227a37aef94c78cd6c62b241ea9/HISTORY.md#2026-02-10-1511)
- Fixes optional chaining handling: rejects `?..`, allows optional function calls, and throws errors for invalid uses. (15.1.0) — [release notes](https://github.com/josdejong/mathjs/blob/ef44f12a37f6a227a37aef94c78cd6c62b241ea9/HISTORY.md#2025-11-05-1510)
- Makes isInteger respect tolerances. (15.1.0) — [release notes](https://github.com/josdejong/mathjs/blob/ef44f12a37f6a227a37aef94c78cd6c62b241ea9/HISTORY.md#2025-11-05-1510)

### New APIs and options

- Adds a function to calculate Bernoulli numbers. (15.1.0) — [release notes](https://github.com/josdejong/mathjs/blob/ef44f12a37f6a227a37aef94c78cd6c62b241ea9/HISTORY.md#2025-11-05-1510)
- Adds support for optional chaining with expressions such as object?.key. (15.1.0) — [release notes](https://github.com/josdejong/mathjs/blob/ef44f12a37f6a227a37aef94c78cd6c62b241ea9/HISTORY.md#2025-11-05-1510)
- Adds the isBounded function. (15.1.0) — [release notes](https://github.com/josdejong/mathjs/blob/ef44f12a37f6a227a37aef94c78cd6c62b241ea9/HISTORY.md#2025-11-05-1510)
- Adds the isFinite function. (15.1.0) — [release notes](https://github.com/josdejong/mathjs/blob/ef44f12a37f6a227a37aef94c78cd6c62b241ea9/HISTORY.md#2025-11-05-1510)

### Fixes and other changes

- Fixes handling of bigints in compareNatural. (15.1.1) — [release notes](https://github.com/josdejong/mathjs/blob/ef44f12a37f6a227a37aef94c78cd6c62b241ea9/HISTORY.md#2026-02-10-1511)
- Adds nullish type definitions. (15.1.1) — [release notes](https://github.com/josdejong/mathjs/blob/ef44f12a37f6a227a37aef94c78cd6c62b241ea9/HISTORY.md#2026-02-10-1511)
- Fixes conditionals being parsed as optional chaining. (15.1.0) — [release notes](https://github.com/josdejong/mathjs/blob/ef44f12a37f6a227a37aef94c78cd6c62b241ea9/HISTORY.md#2025-11-05-1510)
- Avoids errors when mapping or filtering empty arrays and matrices. (15.1.0) — [release notes](https://github.com/josdejong/mathjs/blob/ef44f12a37f6a227a37aef94c78cd6c62b241ea9/HISTORY.md#2025-11-05-1510)
- Fixes unit serialization when an internal property is missing. (15.1.0) — [release notes](https://github.com/josdejong/mathjs/blob/ef44f12a37f6a227a37aef94c78cd6c62b241ea9/HISTORY.md#2025-11-05-1510)
