squiggle/packages/website/docs/Api/Math.md

91 lines
996 B
Markdown
Raw Normal View History

2022-06-05 20:59:45 +00:00
---
sidebar_position: 5
title: Math
---
### E
2022-06-05 21:13:56 +00:00
2022-06-05 20:59:45 +00:00
Euler's number; ≈ 2.718281828459045
```javascript
2022-06-05 21:13:56 +00:00
number;
2022-06-05 20:59:45 +00:00
```
### LN2
2022-06-05 21:13:56 +00:00
2022-06-05 20:59:45 +00:00
Natural logarithm of 2; ≈ 0.6931471805599453
```javascript
2022-06-05 21:13:56 +00:00
number;
2022-06-05 20:59:45 +00:00
```
### LN10
2022-06-05 21:13:56 +00:00
2022-06-05 20:59:45 +00:00
Natural logarithm of 10; ≈ 2.302585092994046
```javascript
2022-06-05 21:13:56 +00:00
number;
2022-06-05 20:59:45 +00:00
```
### LOG2E
2022-06-05 21:13:56 +00:00
2022-06-05 20:59:45 +00:00
Base 2 logarithm of E; ≈ 1.4426950408889634
```javascript
2022-06-05 21:13:56 +00:00
number;
2022-06-05 20:59:45 +00:00
```
### LOG10E
2022-06-05 21:13:56 +00:00
2022-06-05 20:59:45 +00:00
Base 10 logarithm of E; ≈ 0.4342944819032518
```javascript
2022-06-05 21:13:56 +00:00
number;
2022-06-05 20:59:45 +00:00
```
### PI
2022-06-05 21:13:56 +00:00
2022-06-05 20:59:45 +00:00
Pi - ratio of the circumference to the diameter of a circle; ≈ 3.141592653589793
```javascript
2022-06-05 21:13:56 +00:00
number;
2022-06-05 20:59:45 +00:00
```
### SQRT1_2
2022-06-05 21:13:56 +00:00
2022-06-05 20:59:45 +00:00
Square root of 1/2; ≈ 0.7071067811865476
```javascript
2022-06-05 21:13:56 +00:00
number;
2022-06-05 20:59:45 +00:00
```
### SQRT2
2022-06-05 21:13:56 +00:00
2022-06-05 20:59:45 +00:00
Square root of 2; ≈ 1.4142135623730951
```javascript
2022-06-05 21:13:56 +00:00
number;
2022-06-05 20:59:45 +00:00
```
### PHI
2022-06-05 21:13:56 +00:00
2022-06-05 20:59:45 +00:00
Phi is the golden ratio. 1.618033988749895
```javascript
2022-06-05 21:13:56 +00:00
number;
2022-06-05 20:59:45 +00:00
```
### TAU
2022-06-05 21:13:56 +00:00
Tau is the ratio constant of a circle's circumference to radius, equal to 2 \* pi. 6.283185307179586
2022-06-05 20:59:45 +00:00
```javascript
2022-06-05 21:13:56 +00:00
number;
2022-06-05 20:59:45 +00:00
```
### Infinity
```javascript
2022-06-05 21:13:56 +00:00
number;
```