From e662a912c14ee7dbad673fd072594ccc8d58251a Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 8 Mar 2019 15:54:34 -0700 Subject: [PATCH] added content for all new math functions --- .../flux/functions/math/float64bits.md | 2 +- .../reference/flux/functions/math/hypot.md | 23 ++++++++---- .../reference/flux/functions/math/ilogb.md | 12 ++++--- .../reference/flux/functions/math/isinf.md | 22 +++++++----- .../reference/flux/functions/math/isnan.md | 12 ++++--- .../v2.0/reference/flux/functions/math/j0.md | 10 +++--- .../v2.0/reference/flux/functions/math/j1.md | 9 ++--- .../v2.0/reference/flux/functions/math/jn.md | 14 +++++--- .../reference/flux/functions/math/ldexp.md | 20 +++++++---- .../reference/flux/functions/math/lgamma.md | 12 ++++--- .../v2.0/reference/flux/functions/math/log.md | 11 +++--- .../reference/flux/functions/math/log10.md | 11 +++--- .../reference/flux/functions/math/log1p.md | 15 +++++--- .../reference/flux/functions/math/log2.md | 11 +++--- .../reference/flux/functions/math/logb.md | 10 +++--- .../reference/flux/functions/math/m_inf.md | 21 ++++++----- .../reference/flux/functions/math/m_max.md | 21 ++++++++--- .../reference/flux/functions/math/m_min.md | 20 ++++++++--- .../v2.0/reference/flux/functions/math/mod.md | 22 +++++++++--- .../reference/flux/functions/math/modf.md | 12 ++++--- .../v2.0/reference/flux/functions/math/nan.md | 22 ++---------- .../flux/functions/math/nextafter.md | 17 ++++++--- .../v2.0/reference/flux/functions/math/pow.md | 35 ++++++++++++++++--- .../reference/flux/functions/math/pow10.md | 13 +++---- .../flux/functions/math/remainder.md | 19 +++++++--- .../reference/flux/functions/math/round.md | 10 +++--- .../flux/functions/math/roundtoeven.md | 10 +++--- .../reference/flux/functions/math/signbit.md | 13 +++---- .../v2.0/reference/flux/functions/math/sin.md | 12 ++++--- .../reference/flux/functions/math/sincos.md | 10 +++--- .../reference/flux/functions/math/sinh.md | 10 +++--- .../reference/flux/functions/math/sqrt.md | 11 +++--- .../v2.0/reference/flux/functions/math/tan.md | 10 +++--- .../reference/flux/functions/math/tanh.md | 10 +++--- .../reference/flux/functions/math/trunc.md | 10 +++--- .../v2.0/reference/flux/functions/math/y0.md | 11 +++--- .../v2.0/reference/flux/functions/math/y1.md | 11 +++--- .../v2.0/reference/flux/functions/math/yn.md | 17 ++++++--- 38 files changed, 348 insertions(+), 193 deletions(-) diff --git a/content/v2.0/reference/flux/functions/math/float64bits.md b/content/v2.0/reference/flux/functions/math/float64bits.md index 77ba8204a..5e63f7af4 100644 --- a/content/v2.0/reference/flux/functions/math/float64bits.md +++ b/content/v2.0/reference/flux/functions/math/float64bits.md @@ -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" diff --git a/content/v2.0/reference/flux/functions/math/hypot.md b/content/v2.0/reference/flux/functions/math/hypot.md index d25a2d887..0d51b6d2a 100644 --- a/content/v2.0/reference/flux/functions/math/hypot.md +++ b/content/v2.0/reference/flux/functions/math/hypot.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/ilogb.md b/content/v2.0/reference/flux/functions/math/ilogb.md index 2d514c1bf..616310abd 100644 --- a/content/v2.0/reference/flux/functions/math/ilogb.md +++ b/content/v2.0/reference/flux/functions/math/ilogb.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/isinf.md b/content/v2.0/reference/flux/functions/math/isinf.md index 4ed8f5402..ec11f544c 100644 --- a/content/v2.0/reference/flux/functions/math/isinf.md +++ b/content/v2.0/reference/flux/functions/math/isinf.md @@ -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_ diff --git a/content/v2.0/reference/flux/functions/math/isnan.md b/content/v2.0/reference/flux/functions/math/isnan.md index 0d1e05517..0fe933e36 100644 --- a/content/v2.0/reference/flux/functions/math/isnan.md +++ b/content/v2.0/reference/flux/functions/math/isnan.md @@ -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_ diff --git a/content/v2.0/reference/flux/functions/math/j0.md b/content/v2.0/reference/flux/functions/math/j0.md index 224eedad8..cfffef274 100644 --- a/content/v2.0/reference/flux/functions/math/j0.md +++ b/content/v2.0/reference/flux/functions/math/j0.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/j1.md b/content/v2.0/reference/flux/functions/math/j1.md index 737e79646..17a8082be 100644 --- a/content/v2.0/reference/flux/functions/math/j1.md +++ b/content/v2.0/reference/flux/functions/math/j1.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/jn.md b/content/v2.0/reference/flux/functions/math/jn.md index 6d8742e76..dfc2d242d 100644 --- a/content/v2.0/reference/flux/functions/math/jn.md +++ b/content/v2.0/reference/flux/functions/math/jn.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/ldexp.md b/content/v2.0/reference/flux/functions/math/ldexp.md index 12d55bb03..cd47ec58e 100644 --- a/content/v2.0/reference/flux/functions/math/ldexp.md +++ b/content/v2.0/reference/flux/functions/math/ldexp.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/lgamma.md b/content/v2.0/reference/flux/functions/math/lgamma.md index 2d0692cc5..4faba4d95 100644 --- a/content/v2.0/reference/flux/functions/math/lgamma.md +++ b/content/v2.0/reference/flux/functions/math/lgamma.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/log.md b/content/v2.0/reference/flux/functions/math/log.md index ff517a9be..0bf0c52c4 100644 --- a/content/v2.0/reference/flux/functions/math/log.md +++ b/content/v2.0/reference/flux/functions/math/log.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/log10.md b/content/v2.0/reference/flux/functions/math/log10.md index b19940655..ac30bd6ee 100644 --- a/content/v2.0/reference/flux/functions/math/log10.md +++ b/content/v2.0/reference/flux/functions/math/log10.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/log1p.md b/content/v2.0/reference/flux/functions/math/log1p.md index de2268066..23ec3ace1 100644 --- a/content/v2.0/reference/flux/functions/math/log1p.md +++ b/content/v2.0/reference/flux/functions/math/log1p.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/log2.md b/content/v2.0/reference/flux/functions/math/log2.md index c23ae2701..85451157f 100644 --- a/content/v2.0/reference/flux/functions/math/log2.md +++ b/content/v2.0/reference/flux/functions/math/log2.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/logb.md b/content/v2.0/reference/flux/functions/math/logb.md index b6cda1844..9841dc640 100644 --- a/content/v2.0/reference/flux/functions/math/logb.md +++ b/content/v2.0/reference/flux/functions/math/logb.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/m_inf.md b/content/v2.0/reference/flux/functions/math/m_inf.md index c7c1f640f..37ccd65e1 100644 --- a/content/v2.0/reference/flux/functions/math/m_inf.md +++ b/content/v2.0/reference/flux/functions/math/m_inf.md @@ -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_ diff --git a/content/v2.0/reference/flux/functions/math/m_max.md b/content/v2.0/reference/flux/functions/math/m_max.md index be550b185..4a1d5cd82 100644 --- a/content/v2.0/reference/flux/functions/math/m_max.md +++ b/content/v2.0/reference/flux/functions/math/m_max.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/m_min.md b/content/v2.0/reference/flux/functions/math/m_min.md index 6d4440549..d9e64fede 100644 --- a/content/v2.0/reference/flux/functions/math/m_min.md +++ b/content/v2.0/reference/flux/functions/math/m_min.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/mod.md b/content/v2.0/reference/flux/functions/math/mod.md index d17a40ad2..481d9826a 100644 --- a/content/v2.0/reference/flux/functions/math/mod.md +++ b/content/v2.0/reference/flux/functions/math/mod.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/modf.md b/content/v2.0/reference/flux/functions/math/modf.md index 7f11fbf61..324562495 100644 --- a/content/v2.0/reference/flux/functions/math/modf.md +++ b/content/v2.0/reference/flux/functions/math/modf.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/nan.md b/content/v2.0/reference/flux/functions/math/nan.md index 3fccb0c0c..b5491b92b 100644 --- a/content/v2.0/reference/flux/functions/math/nan.md +++ b/content/v2.0/reference/flux/functions/math/nan.md @@ -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() ``` diff --git a/content/v2.0/reference/flux/functions/math/nextafter.md b/content/v2.0/reference/flux/functions/math/nextafter.md index a505ec255..53a5864aa 100644 --- a/content/v2.0/reference/flux/functions/math/nextafter.md +++ b/content/v2.0/reference/flux/functions/math/nextafter.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/pow.md b/content/v2.0/reference/flux/functions/math/pow.md index 87974f72c..688e98eb8 100644 --- a/content/v2.0/reference/flux/functions/math/pow.md +++ b/content/v2.0/reference/flux/functions/math/pow.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/pow10.md b/content/v2.0/reference/flux/functions/math/pow10.md index f9c5d4565..2a846a890 100644 --- a/content/v2.0/reference/flux/functions/math/pow10.md +++ b/content/v2.0/reference/flux/functions/math/pow10.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/remainder.md b/content/v2.0/reference/flux/functions/math/remainder.md index 9b6fc288b..bedf246ab 100644 --- a/content/v2.0/reference/flux/functions/math/remainder.md +++ b/content/v2.0/reference/flux/functions/math/remainder.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/round.md b/content/v2.0/reference/flux/functions/math/round.md index 4056c94cb..8c335486b 100644 --- a/content/v2.0/reference/flux/functions/math/round.md +++ b/content/v2.0/reference/flux/functions/math/round.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/roundtoeven.md b/content/v2.0/reference/flux/functions/math/roundtoeven.md index 7759d2288..d295c7364 100644 --- a/content/v2.0/reference/flux/functions/math/roundtoeven.md +++ b/content/v2.0/reference/flux/functions/math/roundtoeven.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/signbit.md b/content/v2.0/reference/flux/functions/math/signbit.md index ad86a6a66..7c8bd0707 100644 --- a/content/v2.0/reference/flux/functions/math/signbit.md +++ b/content/v2.0/reference/flux/functions/math/signbit.md @@ -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 - -``` diff --git a/content/v2.0/reference/flux/functions/math/sin.md b/content/v2.0/reference/flux/functions/math/sin.md index 10f70d913..dd3748a43 100644 --- a/content/v2.0/reference/flux/functions/math/sin.md +++ b/content/v2.0/reference/flux/functions/math/sin.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/sincos.md b/content/v2.0/reference/flux/functions/math/sincos.md index e005e80f0..65e5a8d94 100644 --- a/content/v2.0/reference/flux/functions/math/sincos.md +++ b/content/v2.0/reference/flux/functions/math/sincos.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/sinh.md b/content/v2.0/reference/flux/functions/math/sinh.md index 3d18ac8a7..bedfc6a00 100644 --- a/content/v2.0/reference/flux/functions/math/sinh.md +++ b/content/v2.0/reference/flux/functions/math/sinh.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/sqrt.md b/content/v2.0/reference/flux/functions/math/sqrt.md index 1f85a1a33..ee974c9d7 100644 --- a/content/v2.0/reference/flux/functions/math/sqrt.md +++ b/content/v2.0/reference/flux/functions/math/sqrt.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/tan.md b/content/v2.0/reference/flux/functions/math/tan.md index 293ab3d8c..f74fef5f1 100644 --- a/content/v2.0/reference/flux/functions/math/tan.md +++ b/content/v2.0/reference/flux/functions/math/tan.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/tanh.md b/content/v2.0/reference/flux/functions/math/tanh.md index 832131262..cbb72fa8b 100644 --- a/content/v2.0/reference/flux/functions/math/tanh.md +++ b/content/v2.0/reference/flux/functions/math/tanh.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/trunc.md b/content/v2.0/reference/flux/functions/math/trunc.md index 21c564170..9b14fff45 100644 --- a/content/v2.0/reference/flux/functions/math/trunc.md +++ b/content/v2.0/reference/flux/functions/math/trunc.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/y0.md b/content/v2.0/reference/flux/functions/math/y0.md index e5a5e0295..e2a029292 100644 --- a/content/v2.0/reference/flux/functions/math/y0.md +++ b/content/v2.0/reference/flux/functions/math/y0.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/y1.md b/content/v2.0/reference/flux/functions/math/y1.md index ccb1c7181..e8c472532 100644 --- a/content/v2.0/reference/flux/functions/math/y1.md +++ b/content/v2.0/reference/flux/functions/math/y1.md @@ -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 ``` diff --git a/content/v2.0/reference/flux/functions/math/yn.md b/content/v2.0/reference/flux/functions/math/yn.md index 34cd307a5..a5e496c0d 100644 --- a/content/v2.0/reference/flux/functions/math/yn.md +++ b/content/v2.0/reference/flux/functions/math/yn.md @@ -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 ```