squiggle/packages/website/docs/Api/Number.mdx
2022-06-11 08:57:02 -07:00

145 lines
1.5 KiB
Plaintext

---
sidebar_position: 9
title: Number
---
import TOCInline from "@theme/TOCInline";
<TOCInline toc={toc} />
### ceil
```javascript
ceil: (number) => number;
```
### floor
```javascript
floor: (number) => number;
```
### abs
```javascript
abs: (number) => number;
```
### round
```javascript
round: (number) => number;
```
## Statistics
### max
```javascript
max: (list<number>) => number
```
### min
```javascript
min: (list<number>) => number
```
### mean
```javascript
mean: (list<number>) => number
```
### stdev
```javascript
stdev: (list<number>) => number
```
### variance
```javascript
variance: (list<number>) => number
```
## Algebra
### unaryMinus
```javascript
unaryMinus: (number) => number;
```
### equal
```javascript
equal: (number, number) => boolean;
```
### add
```javascript
add: (number, number) => number;
```
### sum
```javascript
sum: (list<number>) => number
```
### cumulative sum
```
cumsum: (list<number>) => list<number>
```
### multiply
```javascript
multiply: (number, number) => number;
```
### product
```javascript
product: (list<number>) => number
```
### cumulative product
```
cumprod: (list<number>) => list<number>
```
### subtract
```javascript
subtract: (number, number) => number;
```
### divide
```javascript
divide: (number, number) => number;
```
### pow
```javascript
pow: (number, number) => number;
```
### exp
```javascript
exp: (number) => number;
```
### log
```javascript
log: (number) => number;
```