index.md (801B)
1 # Core 2 3 ## Usage 4 5 The core of math.js is the `math` namespace containing all functions and constants. There are three ways to do calculations in math.js: 6 7 - Doing regular function calls like `math.add(math.sqrt(4), 2)`. 8 - Evaluating expressions like `math.evaluate('sqrt(4) + 2')` 9 - Chaining operations like `math.chain(4).sqrt().add(2)`. 10 11 ## Configuration 12 13 math.js can be configured using the `math.config()`, see page [Configuration](configuration.md). 14 15 ## Extension 16 17 math.js can be extended with new functions and constants using the function `math.import()`, see page [Extension](extension.md). 18 19 ## Serialization 20 21 To persist or exchange data structures like matrices and units, the data types of math.js can be stringified as JSON. This is explained on the page [Serialization](serialization.md).