added content for all new math functions

pull/87/head
Scott Anderson 2019-03-08 15:54:34 -07:00
parent dd2de0f34b
commit e662a912c1
38 changed files with 348 additions and 193 deletions

View File

@ -10,7 +10,7 @@ weight: 301
The `math.float64bits()` function returns the IEEE 754 binary representation of `f`, with the sign bit of `f` and the result in the same bit position.
_**Output data type: UInteger**_
_**Output data type:** UInteger_
```js
import "math"

View File

@ -1,6 +1,8 @@
---
title: math.hypot() function
description: The math.hypot() function functionDescription
description: >
The math.hypot() function returns the square root of `p*p + q*q`,
taking care to avoid unnecessary overflow and underflow.
menu:
v2_0_ref:
name: math.hypot
@ -8,22 +10,31 @@ menu:
weight: 301
---
The `math.hypot()` function functionDescription
The `math.hypot()` function returns the square root of `p*p + q*q`,
taking care to avoid unnecessary overflow and underflow.
```js
import "math"
math.hypot( EXAMPLE )
math.hypot(p: 2.0, q: 5.0)
```
## Parameters
### x
The value used in the operation.
### p
The P value used in the operation.
_**Data type:** Float_
### q
The Q value used in the operation.
_**Data type:** Float_
## Special cases
```js
math.hypot(p: ±Inf, q:q) // Returns +Inf
math.hypot(p:p, q: ±Inf) // Returns +Inf
math.hypot(p: NaN, q:q) // Returns NaN
math.hypot(p:p, q: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.ilogb() function
description: The math.ilogb() function functionDescription
description: The math.ilogb() function returns the binary exponent of `x` as an integer.
menu:
v2_0_ref:
name: math.ilogb
@ -8,12 +8,14 @@ menu:
weight: 301
---
The `math.ilogb()` function functionDescription
The `math.ilogb()` function returns the binary exponent of `x` as an integer.
_**Output data type:** Integer_
```js
import "math"
math.ilogb( EXAMPLE )
math.ilogb(x: 1.23)
```
## Parameters
@ -25,5 +27,7 @@ _**Data type:** Float_
## Special cases
```js
math.ilogb(x: ±Inf) // Returns MaxInt32
math.ilogb(x: 0) // Returns MinInt32
math.ilogb(x: NaN) // Returns MaxInt32
```

View File

@ -1,6 +1,6 @@
---
title: math.isInf() function
description: The math.isInf() function functionDescription
description: The math.isInf() function reports whether `f` is an infinity, according to `sign`.
menu:
v2_0_ref:
name: math.isInf
@ -8,22 +8,28 @@ menu:
weight: 301
---
The `math.isInf()` function functionDescription
The `math.isInf()` function reports whether `f` is an infinity, according to sign.
_**Output data type:** Boolean_
- If `sign > 0`, `math.isInf` reports whether `f` is positive infinity.
- If `sign < 0`, `math.isInf` reports whether `f` is negative infinity.
- If `sign == 0`, `math.isInf` reports whether `f` is either infinity.
```js
import "math"
math.isInf( EXAMPLE )
math.isInf(f: 2.12, sign: 3)
```
## Parameters
### x
The value used in the operation.
### f
The value used in the evaluation.
_**Data type:** Float_
## Special cases
```js
### sign
The sign used in the evaluation.
```
_**Data type:** Integer_

View File

@ -1,6 +1,6 @@
---
title: math.isNaN() function
description: The math.isNaN() function functionDescription
description: The math.isNaN() function reports whether `f` is an IEEE 754 “not-a-number” value.
menu:
v2_0_ref:
name: math.isNaN
@ -8,18 +8,20 @@ menu:
weight: 301
---
The `math.isNaN()` function functionDescription
The `math.isNaN()` function reports whether `f` is an IEEE 754 “not-a-number” value.
_**Output data type:** Boolean_
```js
import "math"
math.isNaN( EXAMPLE )
math.isNaN(f: 12.345)
```
## Parameters
### x
The value used in the operation.
### f
The value used in the evaluation.
_**Data type:** Float_

View File

@ -1,6 +1,6 @@
---
title: math.j0() function
description: The math.j0() function functionDescription
description: The math.j0() function returns the order-zero Bessel function of the first kind.
menu:
v2_0_ref:
name: math.j0
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.j0()` function functionDescription
The `math.j0()` function returns the order-zero Bessel function of the first kind.
```js
import "math"
math.j0( EXAMPLE )
math.j0(x: 1.23)
```
## Parameters
@ -25,5 +25,7 @@ _**Data type:** Float_
## Special cases
```js
math.j0(x: ±Inf) // Returns 0
math.j0(x: 0) // Returns 1
math.j0(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.j1() function
description: The math.j1() function functionDescription
description: The math.j1() function returns the order-one Bessel function of the first kind.
menu:
v2_0_ref:
name: math.j1
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.j1()` function functionDescription
The `math.j1()` function returns the order-one Bessel function of the first kind.
```js
import "math"
math.j1( EXAMPLE )
math.j1(x: 1.23)
```
## Parameters
@ -25,5 +25,6 @@ _**Data type:** Float_
## Special cases
```js
math.j1(±Inf) // Returns 0
math.j1(NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.jn() function
description: The math.jn() function functionDescription
description: The math.jn() function returns the order-n Bessel function of the first kind.
menu:
v2_0_ref:
name: math.jn
@ -8,16 +8,21 @@ menu:
weight: 301
---
The `math.jn()` function functionDescription
The `math.jn()` function returns the order-n Bessel function of the first kind.
```js
import "math"
math.jn( EXAMPLE )
math.jn(n: 2, x: 1.23)
```
## Parameters
### n
The order number.
_**Data type:** Integer_
### x
The value used in the operation.
@ -25,5 +30,6 @@ _**Data type:** Float_
## Special cases
```js
math.jn(n:n, x: ±Inf) // Returns 0
math.jn(n:n, x: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.ldexp() function
description: The math.ldexp() function functionDescription
description: The math.ldexp() function is the inverse of `math.frexp()`. It returns `frac × 2**exp`.
menu:
v2_0_ref:
name: math.ldexp
@ -8,22 +8,30 @@ menu:
weight: 301
---
The `math.ldexp()` function functionDescription
The `math.ldexp()` function is the inverse of [`math.frexp()`](/v2.0/reference/flux/functions/math/frexp).
It returns `frac × 2**exp`.
```js
import "math"
math.ldexp( EXAMPLE )
math.ldexp(frac: 0.5, exp: 6)
```
## Parameters
### x
The value used in the operation.
### frac
The fraction used in the operation.
_**Data type:** Float_
### exp
The exponent used in the operation.
_**Data type:** Integer_
## Special cases
```js
math.ldexp(frac: ±0, exp:exp) // Returns ±0
math.ldexp(frac: ±Inf, exp:exp) // Returns ±Inf
math.ldexp(frac: NaN, exp:exp) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.lgamma() function
description: The math.lgamma() function functionDescription
description: The math.lgamma() function returns the natural logarithm and sign (-1 or +1) of `math.gamma(x:x)`.
menu:
v2_0_ref:
name: math.lgamma
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.lgamma()` function functionDescription
The `math.lgamma()` function returns the natural logarithm and sign (-1 or +1) of `math.gamma(x:x)`.
```js
import "math"
math.lgamma( EXAMPLE )
math.lgamma(x: 3.14)
```
## Parameters
@ -25,5 +25,9 @@ _**Data type:** Float_
## Special cases
```js
math.lgamma(x: +Inf) // Returns +Inf
math.lgamma(x: 0) // Returns +Inf
math.lgamma(x: -integer) // Returns +Inf
math.lgamma(x: -Inf) // Returns -Inf
math.lgamma(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.log() function
description: The math.log() function functionDescription
description: The math.log() function returns the natural logarithm of `x`.
menu:
v2_0_ref:
name: math.log
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.log()` function functionDescription
The `math.log()` function returns the natural logarithm of `x`.
```js
import "math"
math.log( EXAMPLE )
math.log(x: 3.14)
```
## Parameters
@ -25,5 +25,8 @@ _**Data type:** Float_
## Special cases
```js
math.log(x: +Inf) // Returns +Inf
math.log(x: 0) // Returns -Inf
math.log(x: <0) // Returns NaN
math.log(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.log10() function
description: The math.log10() function functionDescription
description: The math.log10() function returns the decimal logarithm of `x`.
menu:
v2_0_ref:
name: math.log10
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.log10()` function functionDescription
The `math.log10()` function returns the decimal logarithm of `x`.
```js
import "math"
math.log10( EXAMPLE )
math.log10(x: 3.14)
```
## Parameters
@ -25,5 +25,8 @@ _**Data type:** Float_
## Special cases
```js
math.log10(x: +Inf) // Returns +Inf
math.log10(x: 0) // Returns -Inf
math.log10(x: <0) // Returns NaN
math.log10(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,8 @@
---
title: math.log1p() function
description: The math.log1p() function functionDescription
description: >
The math.log1p() function returns the natural logarithm of 1 plus its argument `x`.
It is more accurate than `math.log(x: 1 + x)` when `x` is near zero.
menu:
v2_0_ref:
name: math.log1p
@ -8,12 +10,13 @@ menu:
weight: 301
---
The `math.log1p()` function functionDescription
The `math.log1p()` function returns the natural logarithm of 1 plus its argument `x`.
It is more accurate than `math.log(x: 1 + x)` when `x` is near zero.
```js
import "math"
math.log1p( EXAMPLE )
math.log1p(x: 0.56)
```
## Parameters
@ -25,5 +28,9 @@ _**Data type:** Float_
## Special cases
```js
math.log1p(x: +Inf) // Returns +Inf
math.log1p(x: ±0) // Returns ±0
math.log1p(x: -1) // Returns -Inf
math.log1p(x: <-1) // Returns NaN
math.log1p(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.log2() function
description: The math.log2() function functionDescription
description: The math.log2() function returns the binary logarithm of `x`.
menu:
v2_0_ref:
name: math.log2
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.log2()` function functionDescription
The `math.log2()` function returns the binary logarithm of `x`.
```js
import "math"
math.log2( EXAMPLE )
math.log2(x: 3.14)
```
## Parameters
@ -25,5 +25,8 @@ _**Data type:** Float_
## Special cases
```js
math.log2(x: +Inf) // Returns +Inf
math.log2(x: 0) // Returns -Inf
math.log2(x: <0) // Returns NaN
math.log2(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.logb() function
description: The math.logb() function functionDescription
description: The math.logb() function returns the binary exponent of `x`.
menu:
v2_0_ref:
name: math.logb
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.logb()` function functionDescription
The `math.logb()` function returns the binary exponent of `x`.
```js
import "math"
math.logb( EXAMPLE )
math.logb(x: 3.14)
```
## Parameters
@ -25,5 +25,7 @@ _**Data type:** Float_
## Special cases
```js
math.logb(x: ±Inf) // Returns +Inf
math.logb(x: 0) // Returns -Inf
math.logb(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,8 @@
---
title: math.m_inf() function
description: The math.m_inf() function functionDescription
description: The math.m_inf() function returns positive infinity if `sign >= 0`, negative infinity if `sign < 0`.
menu:
v2_0_ref:
name: math.m_inf
@ -8,22 +10,19 @@ menu:
weight: 301
---
The `math.m_inf()` function functionDescription
The `math.m_inf()` function returns positive infinity if `sign >= 0`, negative infinity if `sign < 0`.
_**Output data type:** Float_
```js
import "math"
math.m_inf( EXAMPLE )
math.m_inf(sign: 1)
```
## Parameters
### x
The value used in the operation.
### sign
The sign value used in the operation.
_**Data type:** Float_
## Special cases
```js
```
_**Data type:** Integer_

View File

@ -1,6 +1,6 @@
---
title: math.m_max() function
description: The math.m_max() function functionDescription
description: The math.m_max() function returns the larger of `x` or `y`.
menu:
v2_0_ref:
name: math.m_max
@ -8,22 +8,33 @@ menu:
weight: 301
---
The `math.m_max()` function functionDescription
The `math.m_max()` function returns the larger of `x` or `y`.
```js
import "math"
math.m_max( EXAMPLE )
math.m_max(x: 1.23, y: 4.56)
```
## Parameters
### x
The value used in the operation.
The X value used in the operation.
_**Data type:** Float_
### y
The Y value used in the operation.
_**Data type:** Float_
## Special cases
```js
math.m_max(x:x, y:+Inf) // Returns +Inf
math.m_max(x: +Inf, y:y) // Returns +Inf
math.m_max(x:x, y: NaN) // Returns NaN
math.m_max(x: NaN, y:y) // Returns NaN
math.m_max(x: +0, y: ±0) // Returns +0
math.m_max(x: ±0, y: +0) // Returns +0
math.m_max(x: -0, y: -0) // Returns -0
```

View File

@ -1,6 +1,6 @@
---
title: math.m_min() function
description: The math.m_min() function functionDescription
description: The math.m_min() function returns the smaller of `x` or `y`.
menu:
v2_0_ref:
name: math.m_min
@ -8,22 +8,32 @@ menu:
weight: 301
---
The `math.m_min()` function functionDescription
The `math.m_min()` function returns the smaller of `x` or `y`.
```js
import "math"
math.m_min( EXAMPLE )
math.m_min(x: 1.23, y: 4.56)
```
## Parameters
### x
The value used in the operation.
The X value used in the operation.
_**Data type:** Float_
### y
The Y value used in the operation.
_**Data type:** Float_
## Special cases
```js
Min(x:x, y: -Inf) // Returns -Inf
Min(x: -Inf, y:y) // Returns -Inf
Min(x:x, y: NaN) // Returns NaN
Min(x: NaN, y:y) // Returns NaN
Min(x: -0, y: ±0) // Returns -0
Min(x: ±0, y: -0) // Returns -0
```

View File

@ -1,6 +1,8 @@
---
title: math.mod() function
description: The math.mod() function functionDescription
description: >
The math.mod() function returns the floating-point remainder of `x`/`y`.
The magnitude of the result is less than `y` and its sign agrees with that of `x`.
menu:
v2_0_ref:
name: math.mod
@ -8,22 +10,32 @@ menu:
weight: 301
---
The `math.mod()` function functionDescription
The `math.mod()` function returns the floating-point remainder of `x`/`y`.
The magnitude of the result is less than `y` and its sign agrees with that of `x`.
```js
import "math"
math.mod( EXAMPLE )
math.mod(x: 1.23, y: 4.56)
```
## Parameters
### x
The value used in the operation.
The X value used in the operation.
_**Data type:** Float_
### y
The Y value used in the operation.
_**Data type:** Float_
## Special cases
```js
math.mod(x: ±Inf, y:y) // Returns NaN
math.mod(x: NaN, y:y) // Returns NaN
math.mod(x:x, y: 0) // Returns NaN
math.mod(x:x, y: ±Inf) // Returns x
math.mod(x:x, y: NaN) // Returns NaN
```

View File

@ -1,6 +1,8 @@
---
title: math.modf() function
description: The math.modf() function functionDescription
description: >
The math.modf() function returns integer and fractional floating-point numbers that sum to `f`.
Both values have the same sign as `f`.
menu:
v2_0_ref:
name: math.modf
@ -8,12 +10,13 @@ menu:
weight: 301
---
The `math.modf()` function functionDescription
The `math.modf()` function returns integer and fractional floating-point numbers that sum to `f`.
Both values have the same sign as `f`.
```js
import "math"
math.modf( EXAMPLE )
math.modf(x: 3.14)
```
## Parameters
@ -25,5 +28,6 @@ _**Data type:** Float_
## Special cases
```js
math.modf(x: ±Inf) // Returns int: ±Inf, frac: NaN
math.modf(x: NaN) // Returns int: NaN, frac: NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.NaN() function
description: The math.NaN() function functionDescription
description: The math.NaN() function returns an IEEE 754 “not-a-number” value.
menu:
v2_0_ref:
name: math.NaN
@ -8,26 +8,10 @@ menu:
weight: 301
---
The `math.NaN()` function functionDescription
The `math.NaN()` function returns an IEEE 754 “not-a-number” value.
```js
import "math"
math.NaN( EXAMPLE )
```
## Parameters
### x
The value used in the operation.
_**Data type:** Float_
### x
The value used in the operation.
_**Data type:** Float_
## Special cases
```js
math.NaN()
```

View File

@ -1,6 +1,6 @@
---
title: math.nextafter() function
description: The math.nextafter() function functionDescription
description: The math.nextafter() function returns the next representable float value after `x` towards `y`.
menu:
v2_0_ref:
name: math.nextafter
@ -8,22 +8,29 @@ menu:
weight: 301
---
The `math.nextafter()` function functionDescription
The `math.nextafter()` function returns the next representable float value after `x` towards `y`.
```js
import "math"
math.nextafter( EXAMPLE )
math.nextafter(x: 1.23, y: 4.56)
```
## Parameters
### x
The value used in the operation.
The X value used in the operation.
_**Data type:** Float_
### y
The Y value used in the operation.
_**Data type:** Float_
## Special cases
```js
math.nextafter(x:x, y:x) // Returns x
math.nextafter(x: NaN, y:y) // Returns NaN
math.nextafter(x:x, y:NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.pow() function
description: The math.pow() function functionDescription
description: The math.pow() function returns `x**y`, the base-x exponential of y.
menu:
v2_0_ref:
name: math.pow
@ -8,22 +8,47 @@ menu:
weight: 301
---
The `math.pow()` function functionDescription
The `math.pow()` function returns `x**y`, the base-x exponential of y.
```js
import "math"
math.pow( EXAMPLE )
math.pow(x: 2.0, y: 3.0)
```
## Parameters
### x
The value used in the operation.
The X value used in the operation.
_**Data type:** Float_
### y
The Y value used in the operation.
_**Data type:** Float_
## Special cases
```js
// In order of priority
math.pow(x:x, y:±0) // Returns 1 for any x
math.pow(x:1, y:y) // Returns 1 for any y
math.pow(x:X, y:1) // Returns x for any x
math.pow(x:NaN, y:y) // Returns NaN
math.pow(x:x, y:NaN) // Returns NaN
math.pow(x:±0, y:y) // Returns ±Inf for y an odd integer < 0
math.pow(x:±0, y:-Inf) // Returns +Inf
math.pow(x:±0, y:+Inf) // Returns +0
math.pow(x:±0, y:y) // Returns +Inf for finite y < 0 and not an odd integer
math.pow(x:±0, y:y) // Returns ±0 for y an odd integer > 0
math.pow(x:±0, y:y) // Returns +0 for finite y > 0 and not an odd integer
math.pow(x:-1, y:±Inf) // Returns 1
math.pow(x:x, y:+Inf) // Returns +Inf for |x| > 1
math.pow(x:x, y:-Inf) // Returns +0 for |x| > 1
math.pow(x:x, y:+Inf) // Returns +0 for |x| < 1
math.pow(x:x, y:-Inf) // Returns +Inf for |x| < 1
math.pow(x:+Inf, y:y) // Returns +Inf for y > 0
math.pow(x:+Inf, y:y) // Returns +0 for y < 0
math.pow(x:-Inf, y:y) // Returns math.pow(-0, -y)
math.pow(x:x, y:y) // Returns NaN for finite x < 0 and finite non-integer y
```

View File

@ -1,6 +1,6 @@
---
title: math.pow10() function
description: The math.pow10() function functionDescription
description: The math.pow10() function returns `10**n`, the base-10 exponential of `n`.
menu:
v2_0_ref:
name: math.pow10
@ -8,22 +8,23 @@ menu:
weight: 301
---
The `math.pow10()` function functionDescription
The `math.pow10()` function returns `10**n`, the base-10 exponential of `n`.
```js
import "math"
math.pow10( EXAMPLE )
math.pow10(n: 3)
```
## Parameters
### x
### n
The value used in the operation.
_**Data type:** Float_
_**Data type:** Integer_
## Special cases
```js
math.pow10(n: <-323) // Returns 0
math.pow10(n: >308) // Returns +Inf
```

View File

@ -1,6 +1,6 @@
---
title: math.remainder() function
description: The math.remainder() function functionDescription
description: The math.remainder() function returns the IEEE 754 floating-point remainder of `x / y`.
menu:
v2_0_ref:
name: math.remainder
@ -8,22 +8,31 @@ menu:
weight: 301
---
The `math.remainder()` function functionDescription
The `math.remainder()` function returns the IEEE 754 floating-point remainder of `x / y`.
```js
import "math"
math.remainder( EXAMPLE )
math.remainder(x: 21.0, y: 4.0)
```
## Parameters
### x
The value used in the operation.
The numerator used in the operation.
_**Data type:** Float_
### x
The denominator used in the operation.
_**Data type:** Float_
## Special cases
```js
math.remainder(x: ±Inf, y:y) // Returns NaN
math.remainder(x: NaN, y:y) // Returns NaN
math.remainder(x:x, y: 0) // Returns NaN
math.remainder(x:x, y: ±Inf) // Returns x
math.remainder(x:x, y: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.round() function
description: The math.round() function functionDescription
description: The math.round() function returns the nearest integer, rounding half away from zero.
menu:
v2_0_ref:
name: math.round
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.round()` function functionDescription
The `math.round()` function returns the nearest integer, rounding half away from zero.
```js
import "math"
math.round( EXAMPLE )
math.round(x: 2.12)
```
## Parameters
@ -25,5 +25,7 @@ _**Data type:** Float_
## Special cases
```js
math.round(x: ±0) // Returns ±0
math.round(x: ±Inf) // Returns ±Inf
math.round(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.roundtoeven() function
description: The math.roundtoeven() function functionDescription
description: The math.roundtoeven() function returns the nearest integer, rounding ties to even.
menu:
v2_0_ref:
name: math.roundtoeven
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.roundtoeven()` function functionDescription
The `math.roundtoeven()` function returns the nearest integer, rounding ties to even.
```js
import "math"
math.roundtoeven( EXAMPLE )
math.roundtoeven(x: 3.14)
```
## Parameters
@ -25,5 +25,7 @@ _**Data type:** Float_
## Special cases
```js
math.roundtoeven(x: ±0) // Returns ±0
math.roundtoeven(x: ±Inf) // Returns ±Inf
math.roundtoeven(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.signbit() function
description: The math.signbit() function functionDescription
description: The math.signbit() function reports whether `x` is negative or negative zero.
menu:
v2_0_ref:
name: math.signbit
@ -8,12 +8,14 @@ menu:
weight: 301
---
The `math.signbit()` function functionDescription
The `math.signbit()` function reports whether `x` is negative or negative zero.
_**Output data type:** Boolean_
```js
import "math"
math.signbit( EXAMPLE )
math.signbit(x: -1.2)
```
## Parameters
@ -22,8 +24,3 @@ math.signbit( EXAMPLE )
The value used in the operation.
_**Data type:** Float_
## Special cases
```js
```

View File

@ -1,6 +1,6 @@
---
title: math.sin() function
description: The math.sin() function functionDescription
description: The math.sin() function returns the sine of the radian argument `x`.
menu:
v2_0_ref:
name: math.sin
@ -8,22 +8,24 @@ menu:
weight: 301
---
The `math.sin()` function functionDescription
The `math.sin()` function returns the sine of the radian argument `x`.
```js
import "math"
math.sin( EXAMPLE )
math.sin(x: 3.14)
```
## Parameters
### x
The value used in the operation.
The radian value used in the operation.
_**Data type:** Float_
## Special cases
```js
math.sin(x: ±0) // Returns ±0
math.sin(x: ±Inf) // Returns NaN
math.sin(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.sincos() function
description: The math.sincos() function functionDescription
description: The math.sincos() function returns the values of `math.sin(x:x)` and `math.cos(x:x)`.
menu:
v2_0_ref:
name: math.sincos
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.sincos()` function functionDescription
The `math.sincos()` function returns the values of `math.sin(x:x)` and `math.cos(x:x)`.
```js
import "math"
math.sincos( EXAMPLE )
math.sincos(x: 1.23)
```
## Parameters
@ -25,5 +25,7 @@ _**Data type:** Float_
## Special cases
```js
math.sincos(x: ±0) // Returns ±0, 1
math.sincos(x: ±Inf) // Returns NaN, NaN
math.sincos(x: NaN) // Returns NaN, NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.sinh() function
description: The math.sinh() function functionDescription
description: The math.sinh() function returns the hyperbolic sine of `x`.
menu:
v2_0_ref:
name: math.sinh
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.sinh()` function functionDescription
The `math.sinh()` function returns the hyperbolic sine of `x`.
```js
import "math"
math.sinh( EXAMPLE )
math.sinh(x: 1.23)
```
## Parameters
@ -25,5 +25,7 @@ _**Data type:** Float_
## Special cases
```js
math.sinh(x: ±0) // Returns ±0
math.sinh(x: ±Inf) // Returns ±Inf
math.sinh(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.sqrt() function
description: The math.sqrt() function functionDescription
description: The math.sqrt() function returns the square root of `x`.
menu:
v2_0_ref:
name: math.sqrt
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.sqrt()` function functionDescription
The `math.sqrt()` function returns the square root of `x`.
```js
import "math"
math.sqrt( EXAMPLE )
math.sqrt(x: 4.0)
```
## Parameters
@ -25,5 +25,8 @@ _**Data type:** Float_
## Special cases
```js
math.sqrt(x: +Inf) // Returns +Inf
math.sqrt(x: ±0) // Returns ±0
math.sqrt(x: <0) // Returns NaN
math.sqrt(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.tan() function
description: The math.tan() function functionDescription
description: The math.tan() function returns the tangent of the radian argument `x`.
menu:
v2_0_ref:
name: math.tan
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.tan()` function functionDescription
The `math.tan()` function returns the tangent of the radian argument `x`.
```js
import "math"
math.tan( EXAMPLE )
math.tan(x: 3.14)
```
## Parameters
@ -25,5 +25,7 @@ _**Data type:** Float_
## Special cases
```js
math.tan(x: ±0) // Returns ±0
math.tan(x: ±Inf) // Returns NaN
math.tan(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.tanh() function
description: The math.tanh() function functionDescription
description: The math.tanh() function returns the hyperbolic tangent of `x`.
menu:
v2_0_ref:
name: math.tanh
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.tanh()` function functionDescription
The `math.tanh()` function returns the hyperbolic tangent of `x`.
```js
import "math"
math.tanh( EXAMPLE )
math.tanh(x: 0.0)
```
## Parameters
@ -25,5 +25,7 @@ _**Data type:** Float_
## Special cases
```js
math.tanh(x: ±0) // Returns ±0
math.tanh(x: ±Inf) // Returns ±1
math.tanh(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.trunc() function
description: The math.trunc() function functionDescription
description: The math.trunc() function returns the integer value of `x`.
menu:
v2_0_ref:
name: math.trunc
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.trunc()` function functionDescription
The `math.trunc()` function returns the integer value of `x`.
```js
import "math"
math.trunc( EXAMPLE )
math.trunc(x: 3.14)
```
## Parameters
@ -25,5 +25,7 @@ _**Data type:** Float_
## Special cases
```js
math.trunc(x: ±0) // Returns ±0
math.trunc(x: ±Inf) // Returns ±Inf
math.trunc(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.y0() function
description: The math.y0() function functionDescription
description: The math.y0() function returns the order-zero Bessel function of the second kind.
menu:
v2_0_ref:
name: math.y0
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.y0()` function functionDescription
The `math.y0()` function returns the order-zero Bessel function of the second kind.
```js
import "math"
math.y0( EXAMPLE )
math.y0(x: 3.14)
```
## Parameters
@ -25,5 +25,8 @@ _**Data type:** Float_
## Special cases
```js
math.y0(x: +Inf) // Returns 0
math.y0(x: 0) // Returns -Inf
math.y0(x: <0) // Returns NaN
math.y0(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.y1() function
description: The math.y1() function functionDescription
description: The math.y1() function returns the order-one Bessel function of the second kind.
menu:
v2_0_ref:
name: math.y1
@ -8,12 +8,12 @@ menu:
weight: 301
---
The `math.y1()` function functionDescription
The `math.y1()` function returns the order-one Bessel function of the second kind.
```js
import "math"
math.y1( EXAMPLE )
math.y1(x: 3.14)
```
## Parameters
@ -25,5 +25,8 @@ _**Data type:** Float_
## Special cases
```js
math.y1(x: +Inf) // Returns 0
math.y1(x: 0) // Returns -Inf
math.y1(x: <0) // Returns NaN
math.y1(x: NaN) // Returns NaN
```

View File

@ -1,6 +1,6 @@
---
title: math.yn() function
description: The math.yn() function functionDescription
description: The math.yn() function returns the order-n Bessel function of the second kind.
menu:
v2_0_ref:
name: math.yn
@ -8,16 +8,21 @@ menu:
weight: 301
---
The `math.yn()` function functionDescription
The `math.yn()` function returns the order-n Bessel function of the second kind.
```js
import "math"
math.yn( EXAMPLE )
math.yn(n: 3, x: 3.14)
```
## Parameters
### n
The order number used in the operation.
_**Data type:** Integer_
### x
The value used in the operation.
@ -25,5 +30,9 @@ _**Data type:** Float_
## Special cases
```js
math.yn(n:n, x: +Inf) // Returns 0
math.yn(n: ≥0, x: 0) // Returns -Inf
math.yn(n: <0, x: 0) // Returns +Inf if n is odd, -Inf if n is even
math.yn(n:n, x: <0) // Returns NaN
math.yn(n:n, x:NaN) // Returns NaN
```