From dd2de0f34b66a39f8d74d6e7aa3bd7f4cb14d996 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 8 Mar 2019 13:52:38 -0700 Subject: [PATCH 01/13] WIP new math functions --- .../flux/functions/influxdb-v1/_index.md | 2 +- .../reference/flux/functions/math/_index.md | 21 ++++++++ .../v2.0/reference/flux/functions/math/abs.md | 30 +++++++++++ .../reference/flux/functions/math/acos.md | 32 ++++++++++++ .../reference/flux/functions/math/acosh.md | 33 ++++++++++++ .../reference/flux/functions/math/asin.md | 33 ++++++++++++ .../reference/flux/functions/math/asinh.md | 31 +++++++++++ .../reference/flux/functions/math/atan.md | 30 +++++++++++ .../reference/flux/functions/math/atan2.md | 51 +++++++++++++++++++ .../reference/flux/functions/math/atanh.md | 36 +++++++++++++ .../reference/flux/functions/math/cbrt.md | 31 +++++++++++ .../reference/flux/functions/math/ceil.md | 31 +++++++++++ .../reference/flux/functions/math/copysign.md | 29 +++++++++++ .../v2.0/reference/flux/functions/math/cos.md | 30 +++++++++++ .../reference/flux/functions/math/cosh.md | 31 +++++++++++ .../v2.0/reference/flux/functions/math/dim.md | 37 ++++++++++++++ .../v2.0/reference/flux/functions/math/erf.md | 31 +++++++++++ .../reference/flux/functions/math/erfc.md | 31 +++++++++++ .../reference/flux/functions/math/erfcinv.md | 35 +++++++++++++ .../reference/flux/functions/math/erfinv.md | 35 +++++++++++++ .../v2.0/reference/flux/functions/math/exp.md | 32 ++++++++++++ .../reference/flux/functions/math/exp2.md | 32 ++++++++++++ .../reference/flux/functions/math/expm1.md | 36 +++++++++++++ .../flux/functions/math/float64bits.md | 26 ++++++++++ .../reference/flux/functions/math/floor.md | 31 +++++++++++ .../reference/flux/functions/math/frexp.md | 36 +++++++++++++ .../reference/flux/functions/math/gamma.md | 34 +++++++++++++ .../reference/flux/functions/math/hypot.md | 29 +++++++++++ .../reference/flux/functions/math/ilogb.md | 29 +++++++++++ .../reference/flux/functions/math/isinf.md | 29 +++++++++++ .../reference/flux/functions/math/isnan.md | 29 +++++++++++ .../v2.0/reference/flux/functions/math/j0.md | 29 +++++++++++ .../v2.0/reference/flux/functions/math/j1.md | 29 +++++++++++ .../v2.0/reference/flux/functions/math/jn.md | 29 +++++++++++ .../reference/flux/functions/math/ldexp.md | 29 +++++++++++ .../reference/flux/functions/math/lgamma.md | 29 +++++++++++ .../v2.0/reference/flux/functions/math/log.md | 29 +++++++++++ .../reference/flux/functions/math/log10.md | 29 +++++++++++ .../reference/flux/functions/math/log1p.md | 29 +++++++++++ .../reference/flux/functions/math/log2.md | 29 +++++++++++ .../reference/flux/functions/math/logb.md | 29 +++++++++++ .../reference/flux/functions/math/m_inf.md | 29 +++++++++++ .../reference/flux/functions/math/m_max.md | 29 +++++++++++ .../reference/flux/functions/math/m_min.md | 29 +++++++++++ .../v2.0/reference/flux/functions/math/mod.md | 29 +++++++++++ .../reference/flux/functions/math/modf.md | 29 +++++++++++ .../v2.0/reference/flux/functions/math/nan.md | 33 ++++++++++++ .../flux/functions/math/nextafter.md | 29 +++++++++++ .../v2.0/reference/flux/functions/math/pow.md | 29 +++++++++++ .../reference/flux/functions/math/pow10.md | 29 +++++++++++ .../flux/functions/math/remainder.md | 29 +++++++++++ .../reference/flux/functions/math/round.md | 29 +++++++++++ .../flux/functions/math/roundtoeven.md | 29 +++++++++++ .../reference/flux/functions/math/signbit.md | 29 +++++++++++ .../v2.0/reference/flux/functions/math/sin.md | 29 +++++++++++ .../reference/flux/functions/math/sincos.md | 29 +++++++++++ .../reference/flux/functions/math/sinh.md | 29 +++++++++++ .../reference/flux/functions/math/sqrt.md | 29 +++++++++++ .../v2.0/reference/flux/functions/math/tan.md | 29 +++++++++++ .../reference/flux/functions/math/tanh.md | 29 +++++++++++ .../reference/flux/functions/math/trunc.md | 29 +++++++++++ .../v2.0/reference/flux/functions/math/y0.md | 29 +++++++++++ .../v2.0/reference/flux/functions/math/y1.md | 29 +++++++++++ .../v2.0/reference/flux/functions/math/yn.md | 29 +++++++++++ .../flux/functions/strings/_index.md | 2 +- .../flux/functions/testing/_index.md | 2 +- 66 files changed, 1925 insertions(+), 3 deletions(-) create mode 100644 content/v2.0/reference/flux/functions/math/_index.md create mode 100644 content/v2.0/reference/flux/functions/math/abs.md create mode 100644 content/v2.0/reference/flux/functions/math/acos.md create mode 100644 content/v2.0/reference/flux/functions/math/acosh.md create mode 100644 content/v2.0/reference/flux/functions/math/asin.md create mode 100644 content/v2.0/reference/flux/functions/math/asinh.md create mode 100644 content/v2.0/reference/flux/functions/math/atan.md create mode 100644 content/v2.0/reference/flux/functions/math/atan2.md create mode 100644 content/v2.0/reference/flux/functions/math/atanh.md create mode 100644 content/v2.0/reference/flux/functions/math/cbrt.md create mode 100644 content/v2.0/reference/flux/functions/math/ceil.md create mode 100644 content/v2.0/reference/flux/functions/math/copysign.md create mode 100644 content/v2.0/reference/flux/functions/math/cos.md create mode 100644 content/v2.0/reference/flux/functions/math/cosh.md create mode 100644 content/v2.0/reference/flux/functions/math/dim.md create mode 100644 content/v2.0/reference/flux/functions/math/erf.md create mode 100644 content/v2.0/reference/flux/functions/math/erfc.md create mode 100644 content/v2.0/reference/flux/functions/math/erfcinv.md create mode 100644 content/v2.0/reference/flux/functions/math/erfinv.md create mode 100644 content/v2.0/reference/flux/functions/math/exp.md create mode 100644 content/v2.0/reference/flux/functions/math/exp2.md create mode 100644 content/v2.0/reference/flux/functions/math/expm1.md create mode 100644 content/v2.0/reference/flux/functions/math/float64bits.md create mode 100644 content/v2.0/reference/flux/functions/math/floor.md create mode 100644 content/v2.0/reference/flux/functions/math/frexp.md create mode 100644 content/v2.0/reference/flux/functions/math/gamma.md create mode 100644 content/v2.0/reference/flux/functions/math/hypot.md create mode 100644 content/v2.0/reference/flux/functions/math/ilogb.md create mode 100644 content/v2.0/reference/flux/functions/math/isinf.md create mode 100644 content/v2.0/reference/flux/functions/math/isnan.md create mode 100644 content/v2.0/reference/flux/functions/math/j0.md create mode 100644 content/v2.0/reference/flux/functions/math/j1.md create mode 100644 content/v2.0/reference/flux/functions/math/jn.md create mode 100644 content/v2.0/reference/flux/functions/math/ldexp.md create mode 100644 content/v2.0/reference/flux/functions/math/lgamma.md create mode 100644 content/v2.0/reference/flux/functions/math/log.md create mode 100644 content/v2.0/reference/flux/functions/math/log10.md create mode 100644 content/v2.0/reference/flux/functions/math/log1p.md create mode 100644 content/v2.0/reference/flux/functions/math/log2.md create mode 100644 content/v2.0/reference/flux/functions/math/logb.md create mode 100644 content/v2.0/reference/flux/functions/math/m_inf.md create mode 100644 content/v2.0/reference/flux/functions/math/m_max.md create mode 100644 content/v2.0/reference/flux/functions/math/m_min.md create mode 100644 content/v2.0/reference/flux/functions/math/mod.md create mode 100644 content/v2.0/reference/flux/functions/math/modf.md create mode 100644 content/v2.0/reference/flux/functions/math/nan.md create mode 100644 content/v2.0/reference/flux/functions/math/nextafter.md create mode 100644 content/v2.0/reference/flux/functions/math/pow.md create mode 100644 content/v2.0/reference/flux/functions/math/pow10.md create mode 100644 content/v2.0/reference/flux/functions/math/remainder.md create mode 100644 content/v2.0/reference/flux/functions/math/round.md create mode 100644 content/v2.0/reference/flux/functions/math/roundtoeven.md create mode 100644 content/v2.0/reference/flux/functions/math/signbit.md create mode 100644 content/v2.0/reference/flux/functions/math/sin.md create mode 100644 content/v2.0/reference/flux/functions/math/sincos.md create mode 100644 content/v2.0/reference/flux/functions/math/sinh.md create mode 100644 content/v2.0/reference/flux/functions/math/sqrt.md create mode 100644 content/v2.0/reference/flux/functions/math/tan.md create mode 100644 content/v2.0/reference/flux/functions/math/tanh.md create mode 100644 content/v2.0/reference/flux/functions/math/trunc.md create mode 100644 content/v2.0/reference/flux/functions/math/y0.md create mode 100644 content/v2.0/reference/flux/functions/math/y1.md create mode 100644 content/v2.0/reference/flux/functions/math/yn.md diff --git a/content/v2.0/reference/flux/functions/influxdb-v1/_index.md b/content/v2.0/reference/flux/functions/influxdb-v1/_index.md index e5a2ea5e6..2d1181fc5 100644 --- a/content/v2.0/reference/flux/functions/influxdb-v1/_index.md +++ b/content/v2.0/reference/flux/functions/influxdb-v1/_index.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: InfluxDB v1 parent: Flux functions -weight: 202 +weight: 203 v2.0/tags: [functions, influxdb-v1] --- diff --git a/content/v2.0/reference/flux/functions/math/_index.md b/content/v2.0/reference/flux/functions/math/_index.md new file mode 100644 index 000000000..84bae604f --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/_index.md @@ -0,0 +1,21 @@ +--- +title: Flux math functions +description: > + Math functions provide tools for performing mathematical operations in Flux. + To use them, import the `math` package. +menu: + v2_0_ref: + name: Math + parent: Flux functions +weight: 202 +v2.0/tags: [math, functions] +--- + +Math functions provide tools for performing mathematical operations in Flux. +To use them, import the `math` package. + +```js +import "math" +``` + +{{< children type="functions" show="pages" >}} diff --git a/content/v2.0/reference/flux/functions/math/abs.md b/content/v2.0/reference/flux/functions/math/abs.md new file mode 100644 index 000000000..da6b77765 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/abs.md @@ -0,0 +1,30 @@ +--- +title: math.abs() function +description: The math.abs() function returns the absolute value of `x`. +menu: + v2_0_ref: + name: math.abs + parent: Math +weight: 301 +--- + +The `math.abs()` function returns the absolute value of `x`. + +```js +import "math" + +math.abs(x: -1.22) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js +math.abs(x: ±Inf) // Returns +Inf +math.abs(x: NaN) // Returns NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/acos.md b/content/v2.0/reference/flux/functions/math/acos.md new file mode 100644 index 000000000..3c0f3cbbf --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/acos.md @@ -0,0 +1,32 @@ +--- +title: math.acos() function +description: The math.acos() function returns the arccosine, in radians, of `x`. +menu: + v2_0_ref: + name: math.acos + parent: Math +weight: 301 +--- + +The `math.acos()` function returns the arccosine, in radians, of `x`. + +```js +import "math" + +math.acos(x: 0.22) +``` + +## Parameters + +### x +The value used in the operation. +`x` should be greater than -1 and less than 1. +Otherwise, the operation will return `NaN`. + +_**Data type:** Float_ + +## Special cases +```js +math.acos(x: <-1) // Returns NaN +math.acos(x: >1) // Returns NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/acosh.md b/content/v2.0/reference/flux/functions/math/acosh.md new file mode 100644 index 000000000..bfa553ff9 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/acosh.md @@ -0,0 +1,33 @@ +--- +title: math.acosh() function +description: The math.acosh() function returns the inverse hyperbolic cosine of `x`. +menu: + v2_0_ref: + name: math.acosh + parent: Math +weight: 301 +--- + +The `math.acosh()` function returns the inverse hyperbolic cosine of `x`. + +```js +import "math" + +math.acosh(x: 1.22) +``` + +## Parameters + +### x +The value used in the operation. +`x` should be greater than 1. +If less than 1, the operation will return `NaN`. + +_**Data type:** Float_ + +## Special cases +```js +math.acosh(x: +Inf) // Returns +Inf +math.acosh(x: <1) // Returns NaN +math.acosh(x: NaN) // Returns NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/asin.md b/content/v2.0/reference/flux/functions/math/asin.md new file mode 100644 index 000000000..198aa0371 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/asin.md @@ -0,0 +1,33 @@ +--- +title: math.asin() function +description: The math.asin() function returns the arcsine, in radians, of `x`. +menu: + v2_0_ref: + name: math.asin + parent: Math +weight: 301 +--- + +The `math.asin()` function returns the arcsine, in radians, of `x`. + +```js +import "math" + +math.asin(x: 0.22) +``` + +## Parameters + +### x +The value used in the operation. +`x` should be greater than -1 and less than 1. +Otherwise, the operation will return `NaN`. + +_**Data type:** Float_ + +## Special cases +```js +math.asin(x: ±0) // Returns ±0 +math.asin(x: <-1) // Returns NaN +math.asin(x: >1) // Returns NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/asinh.md b/content/v2.0/reference/flux/functions/math/asinh.md new file mode 100644 index 000000000..39d07987c --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/asinh.md @@ -0,0 +1,31 @@ +--- +title: math.asinh() function +description: The math.asinh() function returns the inverse hyperbolic sine of `x`. +menu: + v2_0_ref: + name: math.asinh + parent: Math +weight: 301 +--- + +The `math.asinh()` function returns the inverse hyperbolic sine of `x`. + +```js +import "math" + +math.asinh(x: 3.14) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js +math.asinh(x: ±0) // Returns ±0 +math.asinh(x: ±Inf) // Returns ±Inf +math.asinh(x: NaN) // Returns NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/atan.md b/content/v2.0/reference/flux/functions/math/atan.md new file mode 100644 index 000000000..d7b3e3f3b --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/atan.md @@ -0,0 +1,30 @@ +--- +title: math.atan() function +description: The math.atan() function returns the arctangent, in radians, of `x`. +menu: + v2_0_ref: + name: math.atan + parent: Math +weight: 301 +--- + +The `math.atan()` function returns the arctangent, in radians, of `x`. + +```js +import "math" + +math.atan( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js +math.atan(x: ±0) // Returns ±0 +math.atan(x: ±Inf) // Returns ±Pi/2 +``` diff --git a/content/v2.0/reference/flux/functions/math/atan2.md b/content/v2.0/reference/flux/functions/math/atan2.md new file mode 100644 index 000000000..fe0a99d67 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/atan2.md @@ -0,0 +1,51 @@ +--- +title: math.atan2() function +description: The math.atan2() function returns the arc tangent of `y`/`x`, using the signs of the two to determine the quadrant of the return value. +menu: + v2_0_ref: + name: math.atan2 + parent: Math +weight: 301 +--- + +The `math.atan2()` function returns the arc tangent of `y`/`x`, using the signs +of the two to determine the quadrant of the return value. + +```js +import "math" + +math.atan2(y: 1.22, x: 3.14) +``` + +## Parameters + +### y +The Y coordinate used in the operation. + +_**Data type:** Float_ + +### x +The X coordinate used in the operation. + +_**Data type:** Float_ + +## Special cases +```js +math.atan2(y:y, x:NaN) // Returns NaN +math.atan2(y: NaN, x:x) // Returns NaN +math.atan2(y: +0, x: >=0) // Returns +0 +math.atan2(y: -0, x: >=0) // Returns -0 +math.atan2(y: +0, x: <=-0) // Returns +Pi +math.atan2(y: -0, x: <=-0) // Returns -Pi +math.atan2(y: >0, x: 0) // Returns +Pi/2 +math.atan2(y: <0, x: 0) // Returns -Pi/2 +math.atan2(y: +Inf, x: +Inf) // Returns +Pi/4 +math.atan2(y: -Inf, x: +Inf) // Returns -Pi/4 +math.atan2(y: +Inf, x: -Inf) // Returns 3Pi/4 +math.atan2(y: -Inf, x: -Inf) // Returns -3Pi/4 +math.atan2(y:y, x: +Inf) // Returns 0 +math.atan2(y: >0, x: -Inf) // Returns +Pi +math.atan2(y: <0, x: -Inf) // Returns -Pi +math.atan2(y: +Inf, x:x) // Returns +Pi/2 +math.atan2(y: -Inf, x:x) // Returns -Pi/2 +``` diff --git a/content/v2.0/reference/flux/functions/math/atanh.md b/content/v2.0/reference/flux/functions/math/atanh.md new file mode 100644 index 000000000..a82b1cfcf --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/atanh.md @@ -0,0 +1,36 @@ +--- +title: math.atanh() function +description: The math.atanh() function returns the inverse hyperbolic tangent of `x`. +menu: + v2_0_ref: + name: math.atanh + parent: Math +weight: 301 +--- + +The `math.atanh()` function returns the inverse hyperbolic tangent of `x`. + +```js +import "math" + +math.atanh(x: 0.22) +``` + +## Parameters + +### x +The value used in the operation. +`x` should be greater than -1 and less than 1. +Otherwise, the operation will return `NaN`. + +_**Data type:** Float_ + +## Special cases +```js +math.atanh(x: 1) // Returns +Inf +math.atanh(x: ±0) // Returns ±0 +math.atanh(x: -1) // Returns -Inf +math.atanh(x: <-1) // Returns NaN +math.atanh(x: >1) // Returns NaN +math.atanh(x: NaN) // Returns NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/cbrt.md b/content/v2.0/reference/flux/functions/math/cbrt.md new file mode 100644 index 000000000..966d4b21e --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/cbrt.md @@ -0,0 +1,31 @@ +--- +title: math.cbrt() function +description: The math.cbrt() function returns the cube root of `x`. +menu: + v2_0_ref: + name: math.cbrt + parent: Math +weight: 301 +--- + +The `math.cbrt()` function returns the cube root of `x`. + +```js +import "math" + +math.cbrt(x: 1728) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js +math.cbrt(±0) // Returns ±0 +math.cbrt(±Inf) // Returns ±Inf +math.cbrt(NaN) // Returns NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/ceil.md b/content/v2.0/reference/flux/functions/math/ceil.md new file mode 100644 index 000000000..2f325cbe8 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/ceil.md @@ -0,0 +1,31 @@ +--- +title: math.ceil() function +description: The math.ceil() function returns the least integer value greater than or equal to `x`. +menu: + v2_0_ref: + name: math.ceil + parent: Math +weight: 301 +--- + +The `math.ceil()` function returns the least integer value greater than or equal to `x`. + +```js +import "math" + +math.ceil(x: 3.14) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js +math.ceil(±0) // Returns ±0 +math.ceil(±Inf) // Returns ±Inf +math.ceil(NaN) // Returns NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/copysign.md b/content/v2.0/reference/flux/functions/math/copysign.md new file mode 100644 index 000000000..180e84607 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/copysign.md @@ -0,0 +1,29 @@ +--- +title: math.copysign() function +description: The math.copysign() function returns a value with the magnitude of `x` and the sign of `y`. +menu: + v2_0_ref: + name: math.copysign + parent: Math +weight: 301 +--- + +The `math.copysign()` function returns a value with the magnitude of `x` and the sign of `y`. + +```js +import "math" + +math.copysign(x: 1.0, y: 2.0) +``` + +## Parameters + +### x +The magnitude used in the operation. + +_**Data type:** Float_ + +### y +The sign used in the operation. + +_**Data type:** Float_ diff --git a/content/v2.0/reference/flux/functions/math/cos.md b/content/v2.0/reference/flux/functions/math/cos.md new file mode 100644 index 000000000..3c8850825 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/cos.md @@ -0,0 +1,30 @@ +--- +title: math.cos() function +description: The math.cos() function returns the cosine of the radian argument `x`. +menu: + v2_0_ref: + name: math.cos + parent: Math +weight: 301 +--- + +The `math.cos()` function returns the cosine of the radian argument `x`. + +```js +import "math" + +math.cos(x: 3.14) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js +math.cos(±Inf) // Returns NaN +math.cos(NaN) // Returns NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/cosh.md b/content/v2.0/reference/flux/functions/math/cosh.md new file mode 100644 index 000000000..ed6446d50 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/cosh.md @@ -0,0 +1,31 @@ +--- +title: math.cosh() function +description: The math.cosh() function returns the hyperbolic cosine of `x`. +menu: + v2_0_ref: + name: math.cosh + parent: Math +weight: 301 +--- + +The `math.cosh()` function returns the hyperbolic cosine of `x`. + +```js +import "math" + +math.cosh(x: 1.22) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js +math.cosh(±0) // Returns 1 +math.cosh(±Inf) // Returns +Inf +math.cosh(NaN) // Returns NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/dim.md b/content/v2.0/reference/flux/functions/math/dim.md new file mode 100644 index 000000000..05d581471 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/dim.md @@ -0,0 +1,37 @@ +--- +title: math.dim() function +description: The math.dim() function returns the maximum of `x`-`y` or 0. +menu: + v2_0_ref: + name: math.dim + parent: Math +weight: 301 +--- + +The `math.dim()` function returns the maximum of `x`-`y` or 0. + +```js +import "math" + +math.dim(x: 12.2, y: 8.1) +``` + +## Parameters + +### x +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.dim(x: +Inf, y: +Inf) // Returns NaN +math.dim(x: -Inf, y: -Inf) // Returns NaN +math.dim(x:x, y : NaN) // Returns NaN +math.dim(x: NaN, y :y) // Returns NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/erf.md b/content/v2.0/reference/flux/functions/math/erf.md new file mode 100644 index 000000000..dfceea40f --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/erf.md @@ -0,0 +1,31 @@ +--- +title: math.erf() function +description: The math.erf() function returns the error function of `x`. +menu: + v2_0_ref: + name: math.erf + parent: Math +weight: 301 +--- + +The `math.erf()` function returns the error function of `x`. + +```js +import "math" + +math.erf(x: 22.6) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js +math.erf(+Inf) // Returns 1 +math.erf(-Inf) // Returns -1 +math.erf(NaN) // Returns NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/erfc.md b/content/v2.0/reference/flux/functions/math/erfc.md new file mode 100644 index 000000000..13c07515f --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/erfc.md @@ -0,0 +1,31 @@ +--- +title: math.erfc() function +description: The math.erfc() function returns the complementary error function of `x`. +menu: + v2_0_ref: + name: math.erfc + parent: Math +weight: 301 +--- + +The `math.erfc()` function returns the complementary error function of `x`. + +```js +import "math" + +math.erfc(x: 22.6) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js +math.erfc(+Inf) // Returns 0 +math.erfc(-Inf) // Returns 2 +math.erfc(NaN) // Returns NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/erfcinv.md b/content/v2.0/reference/flux/functions/math/erfcinv.md new file mode 100644 index 000000000..2ef74a0e9 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/erfcinv.md @@ -0,0 +1,35 @@ +--- +title: math.erfcinv() function +description: The math.erfcinv() function returns the inverse of `math.erfc()`. +menu: + v2_0_ref: + name: math.erfcinv + parent: Math +weight: 301 +--- + +The `math.erfcinv()` function returns the inverse of `math.erfc()`. + +```js +import "math" + +math.erfcinv(x: 0.42345) +``` + +## Parameters + +### x +The value used in the operation. +`x` should be greater than 0 and less than 2. +Otherwise, the operation will return `NaN`. + +_**Data type:** Float_ + +## Special cases +```js +math.erfcinv(x: 0) // Returns +Inf +math.erfcinv(x: 2) // Returns -Inf +math.erfcinv(x: <0) // Returns NaN +math.erfcinv(x: >2) // Returns NaN +math.erfcinv(x: NaN) // Returns NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/erfinv.md b/content/v2.0/reference/flux/functions/math/erfinv.md new file mode 100644 index 000000000..1671d3142 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/erfinv.md @@ -0,0 +1,35 @@ +--- +title: math.erfinv() function +description: The math.erfinv() function returns the inverse error function of `x`. +menu: + v2_0_ref: + name: math.erfinv + parent: Math +weight: 301 +--- + +The `math.erfinv()` function returns the inverse error function of `x`. + +```js +import "math" + +math.erfinv(x: 0.22) +``` + +## Parameters + +### x +The value used in the operation. +`x` should be greater than -1 and less than 1. +Otherwise, the operation will return `NaN`. + +_**Data type:** Float_ + +## Special cases +```js +math.erfinv(x: 1) // Returns +Inf +math.erfinv(x: -1) // Returns -Inf +math.erfinv(x: <-1) // Returns NaN +math.erfinv(x: > 1) // Returns NaN +math.erfinv(x: NaN) // Returns NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/exp.md b/content/v2.0/reference/flux/functions/math/exp.md new file mode 100644 index 000000000..c37f5db6b --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/exp.md @@ -0,0 +1,32 @@ +--- +title: math.exp() function +description: The math.exp() function returns `e**x`, the base-e exponential of `x`. +menu: + v2_0_ref: + name: math.exp + parent: Math +weight: 301 +--- + +The `math.exp()` function returns `e**x`, the base-e exponential of `x`. + +```js +import "math" + +math.exp(x: 21.0) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js +math.exp(x: +Inf) // Returns +Inf +math.exp(x: NaN) // Returns NaN +``` + +Very large values overflow to 0 or +Inf. Very small values underflow to 1. diff --git a/content/v2.0/reference/flux/functions/math/exp2.md b/content/v2.0/reference/flux/functions/math/exp2.md new file mode 100644 index 000000000..0eac9c827 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/exp2.md @@ -0,0 +1,32 @@ +--- +title: math.exp2() function +description: The math.exp2() function returns `2**x`, the base-2 exponential of `x`. +menu: + v2_0_ref: + name: math.exp2 + parent: Math +weight: 301 +--- + +The `math.exp2()` function returns `2**x`, the base-2 exponential of `x`. + +```js +import "math" + +math.exp2(x: 21.0) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js +math.exp2(x: +Inf) // Returns +Inf +math.exp2(x: NaN) // Returns NaN +``` + +Very large values overflow to 0 or +Inf. Very small values underflow to 1. diff --git a/content/v2.0/reference/flux/functions/math/expm1.md b/content/v2.0/reference/flux/functions/math/expm1.md new file mode 100644 index 000000000..7241d3a90 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/expm1.md @@ -0,0 +1,36 @@ +--- +title: math.expm1() function +description: > + The math.expm1() function returns `e**x - 1`, the base-e exponential of `x` minus 1. + It is more accurate than `math.exp(x:x) - 1` when `x` is near zero. +menu: + v2_0_ref: + name: math.expm1 + parent: Math +weight: 301 +--- + +The `math.expm1()` function returns `e**x - 1`, the base-e exponential of `x` minus 1. +It is more accurate than `math.exp(x:x) - 1` when `x` is near zero. + +```js +import "math" + +math.expm1( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js +math.expm1(+Inf) // Returns +Inf +math.expm1(-Inf) // Returns -1 +math.expm1(NaN) // Returns NaN +``` + +Very large values overflow to -1 or +Inf. diff --git a/content/v2.0/reference/flux/functions/math/float64bits.md b/content/v2.0/reference/flux/functions/math/float64bits.md new file mode 100644 index 000000000..77ba8204a --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/float64bits.md @@ -0,0 +1,26 @@ +--- +title: math.float64bits() function +description: 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. +menu: + v2_0_ref: + name: math.float64bits + parent: Math +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**_ + +```js +import "math" + +math.float64bits(f: 1234.56) +``` + +## Parameters + +### f +The value used in the operation. + +_**Data type:** Float_ diff --git a/content/v2.0/reference/flux/functions/math/floor.md b/content/v2.0/reference/flux/functions/math/floor.md new file mode 100644 index 000000000..49ac80e9a --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/floor.md @@ -0,0 +1,31 @@ +--- +title: math.floor() function +description: The math.floor() function returns the greatest integer value less than or equal to `x`. +menu: + v2_0_ref: + name: math.floor + parent: Math +weight: 301 +--- + +The `math.floor()` function returns the greatest integer value less than or equal to `x`. + +```js +import "math" + +math.floor(x: 1.22) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js +math.floor(±0) // Returns ±0 +math.floor(±Inf) // Returns ±Inf +math.floor(NaN) // Returns NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/frexp.md b/content/v2.0/reference/flux/functions/math/frexp.md new file mode 100644 index 000000000..a9dc9261f --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/frexp.md @@ -0,0 +1,36 @@ +--- +title: math.frexp() function +description: > + The math.frexp() function breaks `f` into a normalized fraction and an integral power of two. + It returns `frac` and `exp` satisfying `f == frac × 2**exp`, with the absolute + value of `frac` in the interval [½, 1). +menu: + v2_0_ref: + name: math.frexp + parent: Math +weight: 301 +--- + +The `math.frexp()` function breaks `f` into a normalized fraction and an integral power of two. +It returns `frac` and `exp` satisfying `f == frac × 2**exp`, with the absolute value +of `frac` in the interval `[½, 1)`. + +```js +import "math" + +math.frexp(f: 22.3) +``` + +## Parameters + +### f +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js +math.frexp(f: ±0) // Returns ±0, 0 +math.frexp(f: ±Inf) // Returns ±Inf, 0 +math.frexp(f: NaN) // Returns NaN, 0 +``` diff --git a/content/v2.0/reference/flux/functions/math/gamma.md b/content/v2.0/reference/flux/functions/math/gamma.md new file mode 100644 index 000000000..a151adb5f --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/gamma.md @@ -0,0 +1,34 @@ +--- +title: math.gamma() function +description: The math.gamma() function returns the Gamma function of `x`. +menu: + v2_0_ref: + name: math.gamma + parent: Math +weight: 301 +--- + +The `math.gamma()` function returns the Gamma function of `x`. + +```js +import "math" + +math.gamma(x: 2.12) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js +math.gamma(x: +Inf) = +Inf +math.gamma(x: +0) = +Inf +math.gamma(x: -0) = -Inf +math.gamma(x: <0) = NaN for integer x < 0 +math.gamma(x: -Inf) = NaN +math.gamma(x: NaN) = NaN +``` diff --git a/content/v2.0/reference/flux/functions/math/hypot.md b/content/v2.0/reference/flux/functions/math/hypot.md new file mode 100644 index 000000000..d25a2d887 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/hypot.md @@ -0,0 +1,29 @@ +--- +title: math.hypot() function +description: The math.hypot() function functionDescription +menu: + v2_0_ref: + name: math.hypot + parent: Math +weight: 301 +--- + +The `math.hypot()` function functionDescription + +```js +import "math" + +math.hypot( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/ilogb.md b/content/v2.0/reference/flux/functions/math/ilogb.md new file mode 100644 index 000000000..2d514c1bf --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/ilogb.md @@ -0,0 +1,29 @@ +--- +title: math.ilogb() function +description: The math.ilogb() function functionDescription +menu: + v2_0_ref: + name: math.ilogb + parent: Math +weight: 301 +--- + +The `math.ilogb()` function functionDescription + +```js +import "math" + +math.ilogb( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/isinf.md b/content/v2.0/reference/flux/functions/math/isinf.md new file mode 100644 index 000000000..4ed8f5402 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/isinf.md @@ -0,0 +1,29 @@ +--- +title: math.isInf() function +description: The math.isInf() function functionDescription +menu: + v2_0_ref: + name: math.isInf + parent: Math +weight: 301 +--- + +The `math.isInf()` function functionDescription + +```js +import "math" + +math.isInf( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/isnan.md b/content/v2.0/reference/flux/functions/math/isnan.md new file mode 100644 index 000000000..0d1e05517 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/isnan.md @@ -0,0 +1,29 @@ +--- +title: math.isNaN() function +description: The math.isNaN() function functionDescription +menu: + v2_0_ref: + name: math.isNaN + parent: Math +weight: 301 +--- + +The `math.isNaN()` function functionDescription + +```js +import "math" + +math.isNaN( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/j0.md b/content/v2.0/reference/flux/functions/math/j0.md new file mode 100644 index 000000000..224eedad8 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/j0.md @@ -0,0 +1,29 @@ +--- +title: math.j0() function +description: The math.j0() function functionDescription +menu: + v2_0_ref: + name: math.j0 + parent: Math +weight: 301 +--- + +The `math.j0()` function functionDescription + +```js +import "math" + +math.j0( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/j1.md b/content/v2.0/reference/flux/functions/math/j1.md new file mode 100644 index 000000000..737e79646 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/j1.md @@ -0,0 +1,29 @@ +--- +title: math.j1() function +description: The math.j1() function functionDescription +menu: + v2_0_ref: + name: math.j1 + parent: Math +weight: 301 +--- + +The `math.j1()` function functionDescription + +```js +import "math" + +math.j1( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/jn.md b/content/v2.0/reference/flux/functions/math/jn.md new file mode 100644 index 000000000..6d8742e76 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/jn.md @@ -0,0 +1,29 @@ +--- +title: math.jn() function +description: The math.jn() function functionDescription +menu: + v2_0_ref: + name: math.jn + parent: Math +weight: 301 +--- + +The `math.jn()` function functionDescription + +```js +import "math" + +math.jn( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/ldexp.md b/content/v2.0/reference/flux/functions/math/ldexp.md new file mode 100644 index 000000000..12d55bb03 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/ldexp.md @@ -0,0 +1,29 @@ +--- +title: math.ldexp() function +description: The math.ldexp() function functionDescription +menu: + v2_0_ref: + name: math.ldexp + parent: Math +weight: 301 +--- + +The `math.ldexp()` function functionDescription + +```js +import "math" + +math.ldexp( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/lgamma.md b/content/v2.0/reference/flux/functions/math/lgamma.md new file mode 100644 index 000000000..2d0692cc5 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/lgamma.md @@ -0,0 +1,29 @@ +--- +title: math.lgamma() function +description: The math.lgamma() function functionDescription +menu: + v2_0_ref: + name: math.lgamma + parent: Math +weight: 301 +--- + +The `math.lgamma()` function functionDescription + +```js +import "math" + +math.lgamma( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/log.md b/content/v2.0/reference/flux/functions/math/log.md new file mode 100644 index 000000000..ff517a9be --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/log.md @@ -0,0 +1,29 @@ +--- +title: math.log() function +description: The math.log() function functionDescription +menu: + v2_0_ref: + name: math.log + parent: Math +weight: 301 +--- + +The `math.log()` function functionDescription + +```js +import "math" + +math.log( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/log10.md b/content/v2.0/reference/flux/functions/math/log10.md new file mode 100644 index 000000000..b19940655 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/log10.md @@ -0,0 +1,29 @@ +--- +title: math.log10() function +description: The math.log10() function functionDescription +menu: + v2_0_ref: + name: math.log10 + parent: Math +weight: 301 +--- + +The `math.log10()` function functionDescription + +```js +import "math" + +math.log10( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/log1p.md b/content/v2.0/reference/flux/functions/math/log1p.md new file mode 100644 index 000000000..de2268066 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/log1p.md @@ -0,0 +1,29 @@ +--- +title: math.log1p() function +description: The math.log1p() function functionDescription +menu: + v2_0_ref: + name: math.log1p + parent: Math +weight: 301 +--- + +The `math.log1p()` function functionDescription + +```js +import "math" + +math.log1p( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/log2.md b/content/v2.0/reference/flux/functions/math/log2.md new file mode 100644 index 000000000..c23ae2701 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/log2.md @@ -0,0 +1,29 @@ +--- +title: math.log2() function +description: The math.log2() function functionDescription +menu: + v2_0_ref: + name: math.log2 + parent: Math +weight: 301 +--- + +The `math.log2()` function functionDescription + +```js +import "math" + +math.log2( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/logb.md b/content/v2.0/reference/flux/functions/math/logb.md new file mode 100644 index 000000000..b6cda1844 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/logb.md @@ -0,0 +1,29 @@ +--- +title: math.logb() function +description: The math.logb() function functionDescription +menu: + v2_0_ref: + name: math.logb + parent: Math +weight: 301 +--- + +The `math.logb()` function functionDescription + +```js +import "math" + +math.logb( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/m_inf.md b/content/v2.0/reference/flux/functions/math/m_inf.md new file mode 100644 index 000000000..c7c1f640f --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/m_inf.md @@ -0,0 +1,29 @@ +--- +title: math.m_inf() function +description: The math.m_inf() function functionDescription +menu: + v2_0_ref: + name: math.m_inf + parent: Math +weight: 301 +--- + +The `math.m_inf()` function functionDescription + +```js +import "math" + +math.m_inf( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/m_max.md b/content/v2.0/reference/flux/functions/math/m_max.md new file mode 100644 index 000000000..be550b185 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/m_max.md @@ -0,0 +1,29 @@ +--- +title: math.m_max() function +description: The math.m_max() function functionDescription +menu: + v2_0_ref: + name: math.m_max + parent: Math +weight: 301 +--- + +The `math.m_max()` function functionDescription + +```js +import "math" + +math.m_max( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/m_min.md b/content/v2.0/reference/flux/functions/math/m_min.md new file mode 100644 index 000000000..6d4440549 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/m_min.md @@ -0,0 +1,29 @@ +--- +title: math.m_min() function +description: The math.m_min() function functionDescription +menu: + v2_0_ref: + name: math.m_min + parent: Math +weight: 301 +--- + +The `math.m_min()` function functionDescription + +```js +import "math" + +math.m_min( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/mod.md b/content/v2.0/reference/flux/functions/math/mod.md new file mode 100644 index 000000000..d17a40ad2 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/mod.md @@ -0,0 +1,29 @@ +--- +title: math.mod() function +description: The math.mod() function functionDescription +menu: + v2_0_ref: + name: math.mod + parent: Math +weight: 301 +--- + +The `math.mod()` function functionDescription + +```js +import "math" + +math.mod( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/modf.md b/content/v2.0/reference/flux/functions/math/modf.md new file mode 100644 index 000000000..7f11fbf61 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/modf.md @@ -0,0 +1,29 @@ +--- +title: math.modf() function +description: The math.modf() function functionDescription +menu: + v2_0_ref: + name: math.modf + parent: Math +weight: 301 +--- + +The `math.modf()` function functionDescription + +```js +import "math" + +math.modf( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/nan.md b/content/v2.0/reference/flux/functions/math/nan.md new file mode 100644 index 000000000..3fccb0c0c --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/nan.md @@ -0,0 +1,33 @@ +--- +title: math.NaN() function +description: The math.NaN() function functionDescription +menu: + v2_0_ref: + name: math.NaN + parent: Math +weight: 301 +--- + +The `math.NaN()` function functionDescription + +```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 + +``` diff --git a/content/v2.0/reference/flux/functions/math/nextafter.md b/content/v2.0/reference/flux/functions/math/nextafter.md new file mode 100644 index 000000000..a505ec255 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/nextafter.md @@ -0,0 +1,29 @@ +--- +title: math.nextafter() function +description: The math.nextafter() function functionDescription +menu: + v2_0_ref: + name: math.nextafter + parent: Math +weight: 301 +--- + +The `math.nextafter()` function functionDescription + +```js +import "math" + +math.nextafter( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/pow.md b/content/v2.0/reference/flux/functions/math/pow.md new file mode 100644 index 000000000..87974f72c --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/pow.md @@ -0,0 +1,29 @@ +--- +title: math.pow() function +description: The math.pow() function functionDescription +menu: + v2_0_ref: + name: math.pow + parent: Math +weight: 301 +--- + +The `math.pow()` function functionDescription + +```js +import "math" + +math.pow( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/pow10.md b/content/v2.0/reference/flux/functions/math/pow10.md new file mode 100644 index 000000000..f9c5d4565 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/pow10.md @@ -0,0 +1,29 @@ +--- +title: math.pow10() function +description: The math.pow10() function functionDescription +menu: + v2_0_ref: + name: math.pow10 + parent: Math +weight: 301 +--- + +The `math.pow10()` function functionDescription + +```js +import "math" + +math.pow10( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/remainder.md b/content/v2.0/reference/flux/functions/math/remainder.md new file mode 100644 index 000000000..9b6fc288b --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/remainder.md @@ -0,0 +1,29 @@ +--- +title: math.remainder() function +description: The math.remainder() function functionDescription +menu: + v2_0_ref: + name: math.remainder + parent: Math +weight: 301 +--- + +The `math.remainder()` function functionDescription + +```js +import "math" + +math.remainder( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/round.md b/content/v2.0/reference/flux/functions/math/round.md new file mode 100644 index 000000000..4056c94cb --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/round.md @@ -0,0 +1,29 @@ +--- +title: math.round() function +description: The math.round() function functionDescription +menu: + v2_0_ref: + name: math.round + parent: Math +weight: 301 +--- + +The `math.round()` function functionDescription + +```js +import "math" + +math.round( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/roundtoeven.md b/content/v2.0/reference/flux/functions/math/roundtoeven.md new file mode 100644 index 000000000..7759d2288 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/roundtoeven.md @@ -0,0 +1,29 @@ +--- +title: math.roundtoeven() function +description: The math.roundtoeven() function functionDescription +menu: + v2_0_ref: + name: math.roundtoeven + parent: Math +weight: 301 +--- + +The `math.roundtoeven()` function functionDescription + +```js +import "math" + +math.roundtoeven( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/signbit.md b/content/v2.0/reference/flux/functions/math/signbit.md new file mode 100644 index 000000000..ad86a6a66 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/signbit.md @@ -0,0 +1,29 @@ +--- +title: math.signbit() function +description: The math.signbit() function functionDescription +menu: + v2_0_ref: + name: math.signbit + parent: Math +weight: 301 +--- + +The `math.signbit()` function functionDescription + +```js +import "math" + +math.signbit( EXAMPLE ) +``` + +## Parameters + +### x +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 new file mode 100644 index 000000000..10f70d913 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/sin.md @@ -0,0 +1,29 @@ +--- +title: math.sin() function +description: The math.sin() function functionDescription +menu: + v2_0_ref: + name: math.sin + parent: Math +weight: 301 +--- + +The `math.sin()` function functionDescription + +```js +import "math" + +math.sin( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/sincos.md b/content/v2.0/reference/flux/functions/math/sincos.md new file mode 100644 index 000000000..e005e80f0 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/sincos.md @@ -0,0 +1,29 @@ +--- +title: math.sincos() function +description: The math.sincos() function functionDescription +menu: + v2_0_ref: + name: math.sincos + parent: Math +weight: 301 +--- + +The `math.sincos()` function functionDescription + +```js +import "math" + +math.sincos( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/sinh.md b/content/v2.0/reference/flux/functions/math/sinh.md new file mode 100644 index 000000000..3d18ac8a7 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/sinh.md @@ -0,0 +1,29 @@ +--- +title: math.sinh() function +description: The math.sinh() function functionDescription +menu: + v2_0_ref: + name: math.sinh + parent: Math +weight: 301 +--- + +The `math.sinh()` function functionDescription + +```js +import "math" + +math.sinh( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/sqrt.md b/content/v2.0/reference/flux/functions/math/sqrt.md new file mode 100644 index 000000000..1f85a1a33 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/sqrt.md @@ -0,0 +1,29 @@ +--- +title: math.sqrt() function +description: The math.sqrt() function functionDescription +menu: + v2_0_ref: + name: math.sqrt + parent: Math +weight: 301 +--- + +The `math.sqrt()` function functionDescription + +```js +import "math" + +math.sqrt( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/tan.md b/content/v2.0/reference/flux/functions/math/tan.md new file mode 100644 index 000000000..293ab3d8c --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/tan.md @@ -0,0 +1,29 @@ +--- +title: math.tan() function +description: The math.tan() function functionDescription +menu: + v2_0_ref: + name: math.tan + parent: Math +weight: 301 +--- + +The `math.tan()` function functionDescription + +```js +import "math" + +math.tan( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/tanh.md b/content/v2.0/reference/flux/functions/math/tanh.md new file mode 100644 index 000000000..832131262 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/tanh.md @@ -0,0 +1,29 @@ +--- +title: math.tanh() function +description: The math.tanh() function functionDescription +menu: + v2_0_ref: + name: math.tanh + parent: Math +weight: 301 +--- + +The `math.tanh()` function functionDescription + +```js +import "math" + +math.tanh( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/trunc.md b/content/v2.0/reference/flux/functions/math/trunc.md new file mode 100644 index 000000000..21c564170 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/trunc.md @@ -0,0 +1,29 @@ +--- +title: math.trunc() function +description: The math.trunc() function functionDescription +menu: + v2_0_ref: + name: math.trunc + parent: Math +weight: 301 +--- + +The `math.trunc()` function functionDescription + +```js +import "math" + +math.trunc( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/y0.md b/content/v2.0/reference/flux/functions/math/y0.md new file mode 100644 index 000000000..e5a5e0295 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/y0.md @@ -0,0 +1,29 @@ +--- +title: math.y0() function +description: The math.y0() function functionDescription +menu: + v2_0_ref: + name: math.y0 + parent: Math +weight: 301 +--- + +The `math.y0()` function functionDescription + +```js +import "math" + +math.y0( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/y1.md b/content/v2.0/reference/flux/functions/math/y1.md new file mode 100644 index 000000000..ccb1c7181 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/y1.md @@ -0,0 +1,29 @@ +--- +title: math.y1() function +description: The math.y1() function functionDescription +menu: + v2_0_ref: + name: math.y1 + parent: Math +weight: 301 +--- + +The `math.y1()` function functionDescription + +```js +import "math" + +math.y1( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/math/yn.md b/content/v2.0/reference/flux/functions/math/yn.md new file mode 100644 index 000000000..34cd307a5 --- /dev/null +++ b/content/v2.0/reference/flux/functions/math/yn.md @@ -0,0 +1,29 @@ +--- +title: math.yn() function +description: The math.yn() function functionDescription +menu: + v2_0_ref: + name: math.yn + parent: Math +weight: 301 +--- + +The `math.yn()` function functionDescription + +```js +import "math" + +math.yn( EXAMPLE ) +``` + +## Parameters + +### x +The value used in the operation. + +_**Data type:** Float_ + +## Special cases +```js + +``` diff --git a/content/v2.0/reference/flux/functions/strings/_index.md b/content/v2.0/reference/flux/functions/strings/_index.md index d80cee1c1..64091a84d 100644 --- a/content/v2.0/reference/flux/functions/strings/_index.md +++ b/content/v2.0/reference/flux/functions/strings/_index.md @@ -7,7 +7,7 @@ menu: v2_0_ref: name: Strings parent: Flux functions -weight: 203 +weight: 204 v2.0/tags: [strings, functions] --- diff --git a/content/v2.0/reference/flux/functions/testing/_index.md b/content/v2.0/reference/flux/functions/testing/_index.md index 2586190ae..c6a5b3383 100644 --- a/content/v2.0/reference/flux/functions/testing/_index.md +++ b/content/v2.0/reference/flux/functions/testing/_index.md @@ -7,7 +7,7 @@ menu: v2_0_ref: name: Testing parent: Flux functions -weight: 204 +weight: 205 v2.0/tags: [testing, functions] --- From e662a912c14ee7dbad673fd072594ccc8d58251a Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 8 Mar 2019 15:54:34 -0700 Subject: [PATCH 02/13] 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 ``` From fc262da60b2bca32e2d5284d0c5738b6cf14cfdd Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 8 Mar 2019 16:07:07 -0700 Subject: [PATCH 03/13] added mathematical constants to flux math package --- .../reference/flux/functions/math/_index.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/content/v2.0/reference/flux/functions/math/_index.md b/content/v2.0/reference/flux/functions/math/_index.md index 84bae604f..4bc85dc28 100644 --- a/content/v2.0/reference/flux/functions/math/_index.md +++ b/content/v2.0/reference/flux/functions/math/_index.md @@ -18,4 +18,29 @@ To use them, import the `math` package. import "math" ``` +## Mathematical constants +That `math` package includes the following mathematical constants. + +```js +math.e = 2.71828182845904523536028747135266249775724709369995957496696763 // https ://oeis.org/A001113 +math.pi = 3.14159265358979323846264338327950288419716939937510582097494459 // https ://oeis.org/A000796 +math.phi = 1.61803398874989484820458683436563811772030917980576286213544862 // https ://oeis.org/A001622 + +math.sqrt2 = 1.41421356237309504880168872420969807856967187537694807317667974 // https ://oeis.org/A002193 +math.sqrte = 1.64872127070012814684865078781416357165377610071014801157507931 // https ://oeis.org/A019774 +math.sqrtpi = 1.77245385090551602729816748334114518279754945612238712821380779 // https ://oeis.org/A002161 +math.sqrtphi = 1.27201964951406896425242246173749149171560804184009624861664038 // https ://oeis.org/A139339 + +math.ln2 = 0.693147180559945309417232121458176568075500134360255254120680009 // https://oeis.org/A002162 +math.log2e = 1 ÷ math.ln2 +math.ln10 = 2.30258509299404568401799145468436420760110148862877297603332790 // https ://oeis.org/A002392 +math.log10e = 1 ÷ math.ln10 + +math.maxfloat = 1.797693134862315708145274237317043567981e+308 // 2**1023 * (2**53 - 1) / 2**52 +math.maxint = 1<<63 - 1 +math.minint = -1 << 63 +math.maxuint = 1<<64 - 1 +``` + +## Mathematical functions {{< children type="functions" show="pages" >}} From d3ef0612640a976678a56c494f1072a7c7fbc292 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 8 Mar 2019 16:20:55 -0700 Subject: [PATCH 04/13] package section naming refactor --- content/v2.0/reference/flux/functions/_index.md | 10 +++++----- content/v2.0/reference/flux/functions/all-functions.md | 2 +- .../v2.0/reference/flux/functions/built-in/_index.md | 4 ++-- .../reference/flux/functions/influxdb-v1/_index.md | 8 ++++---- content/v2.0/reference/flux/functions/math/_index.md | 8 ++++---- .../v2.0/reference/flux/functions/strings/_index.md | 8 ++++---- .../v2.0/reference/flux/functions/testing/_index.md | 8 ++++---- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/content/v2.0/reference/flux/functions/_index.md b/content/v2.0/reference/flux/functions/_index.md index 73360194a..4fabb901e 100644 --- a/content/v2.0/reference/flux/functions/_index.md +++ b/content/v2.0/reference/flux/functions/_index.md @@ -1,15 +1,15 @@ --- -title: Flux functions -description: Flux functions allows you to retrieve, transform, process, and output data easily. -v2.0/tags: [flux, functions] +title: Flux packages and functions +description: Flux packages and functions allows you to retrieve, transform, process, and output data easily. +v2.0/tags: [flux, functions, package] menu: v2_0_ref: - name: Flux functions + name: Flux packages and functions parent: Flux query language weight: 101 --- Flux's functional syntax allows you to retrieve, transform, process, and output data easily. -There is a large library of built-in and importable functions: +There is a large library of built-in functions and importable packages: {{< children >}} diff --git a/content/v2.0/reference/flux/functions/all-functions.md b/content/v2.0/reference/flux/functions/all-functions.md index 804cd2385..f0a0f821a 100644 --- a/content/v2.0/reference/flux/functions/all-functions.md +++ b/content/v2.0/reference/flux/functions/all-functions.md @@ -4,7 +4,7 @@ description: View the full library of documented Flux functions. menu: v2_0_ref: name: View all functions - parent: Flux functions + parent: Flux packages and functions weight: 299 --- diff --git a/content/v2.0/reference/flux/functions/built-in/_index.md b/content/v2.0/reference/flux/functions/built-in/_index.md index eec9bdc4e..f1c635fdf 100644 --- a/content/v2.0/reference/flux/functions/built-in/_index.md +++ b/content/v2.0/reference/flux/functions/built-in/_index.md @@ -6,9 +6,9 @@ description: > menu: v2_0_ref: name: Built-in - parent: Flux functions + parent: Flux packages and functions weight: 201 -v2.0/tags: [built-in, functions] +v2.0/tags: [built-in, functions, package] --- Built-in functions provide a necessary foundation for working with data using Flux. diff --git a/content/v2.0/reference/flux/functions/influxdb-v1/_index.md b/content/v2.0/reference/flux/functions/influxdb-v1/_index.md index 2d1181fc5..195761b5c 100644 --- a/content/v2.0/reference/flux/functions/influxdb-v1/_index.md +++ b/content/v2.0/reference/flux/functions/influxdb-v1/_index.md @@ -1,15 +1,15 @@ --- -title: Flux InfluxDB v1 functions +title: Flux InfluxDB v1 package description: > - InfluxDB v1 Flux functions provide tools for managing data from an InfluxDB v1.x + The Flux InfluxDB v1 package provides functions for managing data from an InfluxDB v1.x database or structured using the InfluxDB v1 data structure. To use them, import the `influxdata/influxdb/v1` package. menu: v2_0_ref: name: InfluxDB v1 - parent: Flux functions + parent: Flux packages and functions weight: 203 -v2.0/tags: [functions, influxdb-v1] +v2.0/tags: [functions, influxdb-v1, package] --- InfluxDB v1 Flux functions provide tools for managing data from an InfluxDB v1.x diff --git a/content/v2.0/reference/flux/functions/math/_index.md b/content/v2.0/reference/flux/functions/math/_index.md index 4bc85dc28..bfcb0d928 100644 --- a/content/v2.0/reference/flux/functions/math/_index.md +++ b/content/v2.0/reference/flux/functions/math/_index.md @@ -1,17 +1,17 @@ --- -title: Flux math functions +title: Flux math package description: > - Math functions provide tools for performing mathematical operations in Flux. + The Flux math package provides constants and functions for performing mathematical operations in Flux. To use them, import the `math` package. menu: v2_0_ref: name: Math - parent: Flux functions + parent: Flux packages and functions weight: 202 v2.0/tags: [math, functions] --- -Math functions provide tools for performing mathematical operations in Flux. +The Flux math package provides constants and functions for performing mathematical operations in Flux. To use them, import the `math` package. ```js diff --git a/content/v2.0/reference/flux/functions/strings/_index.md b/content/v2.0/reference/flux/functions/strings/_index.md index 64091a84d..51401ef81 100644 --- a/content/v2.0/reference/flux/functions/strings/_index.md +++ b/content/v2.0/reference/flux/functions/strings/_index.md @@ -1,14 +1,14 @@ --- -title: Flux string functions +title: Flux strings package description: > - String functions provide tools for manipulating strings in Flux. + The Flux string package provides functions for manipulating strings in Flux. To use them, import the `strings` package. menu: v2_0_ref: name: Strings - parent: Flux functions + parent: Flux packages and functions weight: 204 -v2.0/tags: [strings, functions] +v2.0/tags: [strings, functions, package] --- String functions provide tools for manipulating strings in Flux. diff --git a/content/v2.0/reference/flux/functions/testing/_index.md b/content/v2.0/reference/flux/functions/testing/_index.md index c6a5b3383..726a295a1 100644 --- a/content/v2.0/reference/flux/functions/testing/_index.md +++ b/content/v2.0/reference/flux/functions/testing/_index.md @@ -1,14 +1,14 @@ --- -title: Flux testing functions +title: Flux testing package description: > - Flux testing functions test piped-forward data in specific ways and return errors if the tests fail. + The Flux testing package includes functions that test piped-forward data in specific ways. To use them, import the `testing` package. menu: v2_0_ref: name: Testing - parent: Flux functions + parent: Flux packages and functions weight: 205 -v2.0/tags: [testing, functions] +v2.0/tags: [testing, functions, package] --- Flux testing functions test piped-forward data in specific ways and return errors if the tests fail. From 65e2f02698cfab85c3473a28abc491075720cbbd Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 8 Mar 2019 16:42:23 -0700 Subject: [PATCH 05/13] corrected math functions that return objects with multiple values --- content/v2.0/reference/flux/functions/math/frexp.md | 12 ++++++++---- content/v2.0/reference/flux/functions/math/lgamma.md | 4 ++++ content/v2.0/reference/flux/functions/math/modf.md | 8 ++++++-- content/v2.0/reference/flux/functions/math/sincos.md | 10 +++++++--- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/content/v2.0/reference/flux/functions/math/frexp.md b/content/v2.0/reference/flux/functions/math/frexp.md index a9dc9261f..622a1006c 100644 --- a/content/v2.0/reference/flux/functions/math/frexp.md +++ b/content/v2.0/reference/flux/functions/math/frexp.md @@ -15,10 +15,14 @@ The `math.frexp()` function breaks `f` into a normalized fraction and an integra It returns `frac` and `exp` satisfying `f == frac × 2**exp`, with the absolute value of `frac` in the interval `[½, 1)`. +_**Output data type:** Object_ + ```js import "math" -math.frexp(f: 22.3) +math.frexp(f: 22.0) + +// Returns {frac: 0.6875, exp: 5} ``` ## Parameters @@ -30,7 +34,7 @@ _**Data type:** Float_ ## Special cases ```js -math.frexp(f: ±0) // Returns ±0, 0 -math.frexp(f: ±Inf) // Returns ±Inf, 0 -math.frexp(f: NaN) // Returns NaN, 0 +math.frexp(f: ±0) // Returns {frac: ±0, exp: 0} +math.frexp(f: ±Inf) // Returns {frac: ±Inf, exp: 0} +math.frexp(f: NaN) // Returns {frac: NaN, exp: 0} ``` diff --git a/content/v2.0/reference/flux/functions/math/lgamma.md b/content/v2.0/reference/flux/functions/math/lgamma.md index 4faba4d95..2be3b19e5 100644 --- a/content/v2.0/reference/flux/functions/math/lgamma.md +++ b/content/v2.0/reference/flux/functions/math/lgamma.md @@ -10,10 +10,14 @@ weight: 301 The `math.lgamma()` function returns the natural logarithm and sign (-1 or +1) of `math.gamma(x:x)`. +_**Output data format:** Object_ + ```js import "math" math.lgamma(x: 3.14) + +// Returns {lgamma: 0.8261387047770286, sign: 1} ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/modf.md b/content/v2.0/reference/flux/functions/math/modf.md index 324562495..58e8d07c5 100644 --- a/content/v2.0/reference/flux/functions/math/modf.md +++ b/content/v2.0/reference/flux/functions/math/modf.md @@ -13,10 +13,14 @@ weight: 301 The `math.modf()` function returns integer and fractional floating-point numbers that sum to `f`. Both values have the same sign as `f`. +_**Output data format:** Object_ + ```js import "math" math.modf(x: 3.14) + +// Returns {int: 3, frac: 0.14000000000000012} ``` ## Parameters @@ -28,6 +32,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 +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/sincos.md b/content/v2.0/reference/flux/functions/math/sincos.md index 65e5a8d94..7d1e25ff2 100644 --- a/content/v2.0/reference/flux/functions/math/sincos.md +++ b/content/v2.0/reference/flux/functions/math/sincos.md @@ -10,10 +10,14 @@ weight: 301 The `math.sincos()` function returns the values of `math.sin(x:x)` and `math.cos(x:x)`. +_**Output data format:** Object_ + ```js import "math" math.sincos(x: 1.23) + +// Returns {sin: 0.9424888019316975, cos: 0.3342377271245026} ``` ## Parameters @@ -25,7 +29,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 +math.sincos(x: ±0) // Returns {sin: ±0, cos: 1} +math.sincos(x: ±Inf) // Returns {sin: NaN, cos: NaN} +math.sincos(x: NaN) // Returns {sin: NaN, cos: NaN} ``` From 056748c32ee419247aea379a3a50d391c0e571d4 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 13 Mar 2019 15:33:01 -0500 Subject: [PATCH 06/13] added output data types to all math functions --- .../v2.0/reference/flux/functions/influxdb-v1/_index.md | 4 ++-- content/v2.0/reference/flux/functions/math/_index.md | 8 ++++---- content/v2.0/reference/flux/functions/math/abs.md | 4 ++++ content/v2.0/reference/flux/functions/math/acos.md | 4 ++++ content/v2.0/reference/flux/functions/math/acosh.md | 2 ++ content/v2.0/reference/flux/functions/math/asin.md | 2 ++ content/v2.0/reference/flux/functions/math/asinh.md | 2 ++ content/v2.0/reference/flux/functions/math/atan.md | 2 ++ content/v2.0/reference/flux/functions/math/atan2.md | 2 ++ content/v2.0/reference/flux/functions/math/atanh.md | 2 ++ content/v2.0/reference/flux/functions/math/cbrt.md | 2 ++ content/v2.0/reference/flux/functions/math/ceil.md | 2 ++ content/v2.0/reference/flux/functions/math/copysign.md | 2 ++ content/v2.0/reference/flux/functions/math/cos.md | 2 ++ content/v2.0/reference/flux/functions/math/cosh.md | 2 ++ content/v2.0/reference/flux/functions/math/dim.md | 2 ++ content/v2.0/reference/flux/functions/math/erf.md | 2 ++ content/v2.0/reference/flux/functions/math/erfc.md | 2 ++ content/v2.0/reference/flux/functions/math/erfcinv.md | 2 ++ content/v2.0/reference/flux/functions/math/erfinv.md | 2 ++ content/v2.0/reference/flux/functions/math/exp.md | 2 ++ content/v2.0/reference/flux/functions/math/exp2.md | 2 ++ content/v2.0/reference/flux/functions/math/expm1.md | 2 ++ content/v2.0/reference/flux/functions/math/floor.md | 2 ++ content/v2.0/reference/flux/functions/math/gamma.md | 2 ++ content/v2.0/reference/flux/functions/math/hypot.md | 2 ++ content/v2.0/reference/flux/functions/math/j0.md | 2 ++ content/v2.0/reference/flux/functions/math/j1.md | 2 ++ content/v2.0/reference/flux/functions/math/jn.md | 2 ++ content/v2.0/reference/flux/functions/math/ldexp.md | 2 ++ content/v2.0/reference/flux/functions/math/log.md | 2 ++ content/v2.0/reference/flux/functions/math/log10.md | 2 ++ content/v2.0/reference/flux/functions/math/log1p.md | 2 ++ content/v2.0/reference/flux/functions/math/log2.md | 2 ++ content/v2.0/reference/flux/functions/math/logb.md | 2 ++ content/v2.0/reference/flux/functions/math/m_max.md | 2 ++ content/v2.0/reference/flux/functions/math/m_min.md | 2 ++ content/v2.0/reference/flux/functions/math/mod.md | 2 ++ content/v2.0/reference/flux/functions/math/nan.md | 2 ++ content/v2.0/reference/flux/functions/math/nextafter.md | 2 ++ content/v2.0/reference/flux/functions/math/pow.md | 2 ++ content/v2.0/reference/flux/functions/math/pow10.md | 2 ++ content/v2.0/reference/flux/functions/math/remainder.md | 2 ++ content/v2.0/reference/flux/functions/math/round.md | 2 ++ content/v2.0/reference/flux/functions/math/roundtoeven.md | 2 ++ content/v2.0/reference/flux/functions/math/sin.md | 2 ++ content/v2.0/reference/flux/functions/math/sinh.md | 2 ++ content/v2.0/reference/flux/functions/math/sqrt.md | 2 ++ content/v2.0/reference/flux/functions/math/tan.md | 2 ++ content/v2.0/reference/flux/functions/math/tanh.md | 2 ++ content/v2.0/reference/flux/functions/math/trunc.md | 2 ++ content/v2.0/reference/flux/functions/math/y0.md | 2 ++ content/v2.0/reference/flux/functions/math/y1.md | 2 ++ content/v2.0/reference/flux/functions/math/yn.md | 2 ++ content/v2.0/reference/flux/functions/strings/_index.md | 8 ++++---- content/v2.0/reference/flux/functions/testing/_index.md | 6 +++--- 56 files changed, 121 insertions(+), 13 deletions(-) diff --git a/content/v2.0/reference/flux/functions/influxdb-v1/_index.md b/content/v2.0/reference/flux/functions/influxdb-v1/_index.md index 195761b5c..6a3a54767 100644 --- a/content/v2.0/reference/flux/functions/influxdb-v1/_index.md +++ b/content/v2.0/reference/flux/functions/influxdb-v1/_index.md @@ -3,7 +3,7 @@ title: Flux InfluxDB v1 package description: > The Flux InfluxDB v1 package provides functions for managing data from an InfluxDB v1.x database or structured using the InfluxDB v1 data structure. - To use them, import the `influxdata/influxdb/v1` package. + Import the `influxdata/influxdb/v1` package. menu: v2_0_ref: name: InfluxDB v1 @@ -14,7 +14,7 @@ v2.0/tags: [functions, influxdb-v1, package] InfluxDB v1 Flux functions provide tools for managing data from an InfluxDB v1.x database or structured using the InfluxDB v1 data structure. -To use them, import the `influxdata/influxdb/v1` package: +Import the `influxdata/influxdb/v1` package: ```js import "influxdata/influxdb/v1" diff --git a/content/v2.0/reference/flux/functions/math/_index.md b/content/v2.0/reference/flux/functions/math/_index.md index bfcb0d928..be2529183 100644 --- a/content/v2.0/reference/flux/functions/math/_index.md +++ b/content/v2.0/reference/flux/functions/math/_index.md @@ -1,8 +1,8 @@ --- title: Flux math package description: > - The Flux math package provides constants and functions for performing mathematical operations in Flux. - To use them, import the `math` package. + The Flux math package provides basic constants and mathematical functions. + Import the `math` package. menu: v2_0_ref: name: Math @@ -11,8 +11,8 @@ weight: 202 v2.0/tags: [math, functions] --- -The Flux math package provides constants and functions for performing mathematical operations in Flux. -To use them, import the `math` package. +The Flux math package provides basic constants and mathematical functions. +Import the `math` package. ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/abs.md b/content/v2.0/reference/flux/functions/math/abs.md index da6b77765..8db0c56b7 100644 --- a/content/v2.0/reference/flux/functions/math/abs.md +++ b/content/v2.0/reference/flux/functions/math/abs.md @@ -10,10 +10,14 @@ weight: 301 The `math.abs()` function returns the absolute value of `x`. +_**Output data type:** Float_ + ```js import "math" math.abs(x: -1.22) + +// Returns 1.22 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/acos.md b/content/v2.0/reference/flux/functions/math/acos.md index 3c0f3cbbf..147fceaa4 100644 --- a/content/v2.0/reference/flux/functions/math/acos.md +++ b/content/v2.0/reference/flux/functions/math/acos.md @@ -10,10 +10,14 @@ weight: 301 The `math.acos()` function returns the arccosine, in radians, of `x`. +_**Output data type:** Float_ + ```js import "math" math.acos(x: 0.22) + +// Returns 1.3489818562981022 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/acosh.md b/content/v2.0/reference/flux/functions/math/acosh.md index bfa553ff9..67203611d 100644 --- a/content/v2.0/reference/flux/functions/math/acosh.md +++ b/content/v2.0/reference/flux/functions/math/acosh.md @@ -10,6 +10,8 @@ weight: 301 The `math.acosh()` function returns the inverse hyperbolic cosine of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/asin.md b/content/v2.0/reference/flux/functions/math/asin.md index 198aa0371..da64dccdf 100644 --- a/content/v2.0/reference/flux/functions/math/asin.md +++ b/content/v2.0/reference/flux/functions/math/asin.md @@ -10,6 +10,8 @@ weight: 301 The `math.asin()` function returns the arcsine, in radians, of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/asinh.md b/content/v2.0/reference/flux/functions/math/asinh.md index 39d07987c..1d6206dca 100644 --- a/content/v2.0/reference/flux/functions/math/asinh.md +++ b/content/v2.0/reference/flux/functions/math/asinh.md @@ -10,6 +10,8 @@ weight: 301 The `math.asinh()` function returns the inverse hyperbolic sine of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/atan.md b/content/v2.0/reference/flux/functions/math/atan.md index d7b3e3f3b..379c019ad 100644 --- a/content/v2.0/reference/flux/functions/math/atan.md +++ b/content/v2.0/reference/flux/functions/math/atan.md @@ -10,6 +10,8 @@ weight: 301 The `math.atan()` function returns the arctangent, in radians, of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/atan2.md b/content/v2.0/reference/flux/functions/math/atan2.md index fe0a99d67..4236c6f5d 100644 --- a/content/v2.0/reference/flux/functions/math/atan2.md +++ b/content/v2.0/reference/flux/functions/math/atan2.md @@ -11,6 +11,8 @@ weight: 301 The `math.atan2()` function returns the arc tangent of `y`/`x`, using the signs of the two to determine the quadrant of the return value. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/atanh.md b/content/v2.0/reference/flux/functions/math/atanh.md index a82b1cfcf..fbba09719 100644 --- a/content/v2.0/reference/flux/functions/math/atanh.md +++ b/content/v2.0/reference/flux/functions/math/atanh.md @@ -10,6 +10,8 @@ weight: 301 The `math.atanh()` function returns the inverse hyperbolic tangent of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/cbrt.md b/content/v2.0/reference/flux/functions/math/cbrt.md index 966d4b21e..5d34a8c2f 100644 --- a/content/v2.0/reference/flux/functions/math/cbrt.md +++ b/content/v2.0/reference/flux/functions/math/cbrt.md @@ -10,6 +10,8 @@ weight: 301 The `math.cbrt()` function returns the cube root of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/ceil.md b/content/v2.0/reference/flux/functions/math/ceil.md index 2f325cbe8..82c0792a2 100644 --- a/content/v2.0/reference/flux/functions/math/ceil.md +++ b/content/v2.0/reference/flux/functions/math/ceil.md @@ -10,6 +10,8 @@ weight: 301 The `math.ceil()` function returns the least integer value greater than or equal to `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/copysign.md b/content/v2.0/reference/flux/functions/math/copysign.md index 180e84607..00b12df1c 100644 --- a/content/v2.0/reference/flux/functions/math/copysign.md +++ b/content/v2.0/reference/flux/functions/math/copysign.md @@ -10,6 +10,8 @@ weight: 301 The `math.copysign()` function returns a value with the magnitude of `x` and the sign of `y`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/cos.md b/content/v2.0/reference/flux/functions/math/cos.md index 3c8850825..852e3f3dc 100644 --- a/content/v2.0/reference/flux/functions/math/cos.md +++ b/content/v2.0/reference/flux/functions/math/cos.md @@ -10,6 +10,8 @@ weight: 301 The `math.cos()` function returns the cosine of the radian argument `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/cosh.md b/content/v2.0/reference/flux/functions/math/cosh.md index ed6446d50..8dfe74138 100644 --- a/content/v2.0/reference/flux/functions/math/cosh.md +++ b/content/v2.0/reference/flux/functions/math/cosh.md @@ -10,6 +10,8 @@ weight: 301 The `math.cosh()` function returns the hyperbolic cosine of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/dim.md b/content/v2.0/reference/flux/functions/math/dim.md index 05d581471..7e64fed31 100644 --- a/content/v2.0/reference/flux/functions/math/dim.md +++ b/content/v2.0/reference/flux/functions/math/dim.md @@ -10,6 +10,8 @@ weight: 301 The `math.dim()` function returns the maximum of `x`-`y` or 0. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/erf.md b/content/v2.0/reference/flux/functions/math/erf.md index dfceea40f..f757109aa 100644 --- a/content/v2.0/reference/flux/functions/math/erf.md +++ b/content/v2.0/reference/flux/functions/math/erf.md @@ -10,6 +10,8 @@ weight: 301 The `math.erf()` function returns the error function of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/erfc.md b/content/v2.0/reference/flux/functions/math/erfc.md index 13c07515f..f96183ff8 100644 --- a/content/v2.0/reference/flux/functions/math/erfc.md +++ b/content/v2.0/reference/flux/functions/math/erfc.md @@ -10,6 +10,8 @@ weight: 301 The `math.erfc()` function returns the complementary error function of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/erfcinv.md b/content/v2.0/reference/flux/functions/math/erfcinv.md index 2ef74a0e9..3dc70892e 100644 --- a/content/v2.0/reference/flux/functions/math/erfcinv.md +++ b/content/v2.0/reference/flux/functions/math/erfcinv.md @@ -10,6 +10,8 @@ weight: 301 The `math.erfcinv()` function returns the inverse of `math.erfc()`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/erfinv.md b/content/v2.0/reference/flux/functions/math/erfinv.md index 1671d3142..bdf9b3f32 100644 --- a/content/v2.0/reference/flux/functions/math/erfinv.md +++ b/content/v2.0/reference/flux/functions/math/erfinv.md @@ -10,6 +10,8 @@ weight: 301 The `math.erfinv()` function returns the inverse error function of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/exp.md b/content/v2.0/reference/flux/functions/math/exp.md index c37f5db6b..74c95d780 100644 --- a/content/v2.0/reference/flux/functions/math/exp.md +++ b/content/v2.0/reference/flux/functions/math/exp.md @@ -10,6 +10,8 @@ weight: 301 The `math.exp()` function returns `e**x`, the base-e exponential of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/exp2.md b/content/v2.0/reference/flux/functions/math/exp2.md index 0eac9c827..29733093f 100644 --- a/content/v2.0/reference/flux/functions/math/exp2.md +++ b/content/v2.0/reference/flux/functions/math/exp2.md @@ -10,6 +10,8 @@ weight: 301 The `math.exp2()` function returns `2**x`, the base-2 exponential of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/expm1.md b/content/v2.0/reference/flux/functions/math/expm1.md index 7241d3a90..c1040cd99 100644 --- a/content/v2.0/reference/flux/functions/math/expm1.md +++ b/content/v2.0/reference/flux/functions/math/expm1.md @@ -13,6 +13,8 @@ weight: 301 The `math.expm1()` function returns `e**x - 1`, the base-e exponential of `x` minus 1. It is more accurate than `math.exp(x:x) - 1` when `x` is near zero. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/floor.md b/content/v2.0/reference/flux/functions/math/floor.md index 49ac80e9a..de26e0b4f 100644 --- a/content/v2.0/reference/flux/functions/math/floor.md +++ b/content/v2.0/reference/flux/functions/math/floor.md @@ -10,6 +10,8 @@ weight: 301 The `math.floor()` function returns the greatest integer value less than or equal to `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/gamma.md b/content/v2.0/reference/flux/functions/math/gamma.md index a151adb5f..f9a1ae251 100644 --- a/content/v2.0/reference/flux/functions/math/gamma.md +++ b/content/v2.0/reference/flux/functions/math/gamma.md @@ -10,6 +10,8 @@ weight: 301 The `math.gamma()` function returns the Gamma function of `x`. +_**Output data type:** Float_ + ```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 0d51b6d2a..783c70c07 100644 --- a/content/v2.0/reference/flux/functions/math/hypot.md +++ b/content/v2.0/reference/flux/functions/math/hypot.md @@ -13,6 +13,8 @@ weight: 301 The `math.hypot()` function returns the square root of `p*p + q*q`, taking care to avoid unnecessary overflow and underflow. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/j0.md b/content/v2.0/reference/flux/functions/math/j0.md index cfffef274..75a89d6cb 100644 --- a/content/v2.0/reference/flux/functions/math/j0.md +++ b/content/v2.0/reference/flux/functions/math/j0.md @@ -10,6 +10,8 @@ weight: 301 The `math.j0()` function returns the order-zero Bessel function of the first kind. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/j1.md b/content/v2.0/reference/flux/functions/math/j1.md index 17a8082be..ff3816700 100644 --- a/content/v2.0/reference/flux/functions/math/j1.md +++ b/content/v2.0/reference/flux/functions/math/j1.md @@ -10,6 +10,8 @@ weight: 301 The `math.j1()` function returns the order-one Bessel function of the first kind. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/jn.md b/content/v2.0/reference/flux/functions/math/jn.md index dfc2d242d..85e2d0da1 100644 --- a/content/v2.0/reference/flux/functions/math/jn.md +++ b/content/v2.0/reference/flux/functions/math/jn.md @@ -10,6 +10,8 @@ weight: 301 The `math.jn()` function returns the order-n Bessel function of the first kind. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/ldexp.md b/content/v2.0/reference/flux/functions/math/ldexp.md index cd47ec58e..3f8b54224 100644 --- a/content/v2.0/reference/flux/functions/math/ldexp.md +++ b/content/v2.0/reference/flux/functions/math/ldexp.md @@ -11,6 +11,8 @@ weight: 301 The `math.ldexp()` function is the inverse of [`math.frexp()`](/v2.0/reference/flux/functions/math/frexp). It returns `frac × 2**exp`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/log.md b/content/v2.0/reference/flux/functions/math/log.md index 0bf0c52c4..6eb5e72ec 100644 --- a/content/v2.0/reference/flux/functions/math/log.md +++ b/content/v2.0/reference/flux/functions/math/log.md @@ -10,6 +10,8 @@ weight: 301 The `math.log()` function returns the natural logarithm of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/log10.md b/content/v2.0/reference/flux/functions/math/log10.md index ac30bd6ee..4efd96e84 100644 --- a/content/v2.0/reference/flux/functions/math/log10.md +++ b/content/v2.0/reference/flux/functions/math/log10.md @@ -10,6 +10,8 @@ weight: 301 The `math.log10()` function returns the decimal logarithm of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/log1p.md b/content/v2.0/reference/flux/functions/math/log1p.md index 23ec3ace1..0f52fbb4d 100644 --- a/content/v2.0/reference/flux/functions/math/log1p.md +++ b/content/v2.0/reference/flux/functions/math/log1p.md @@ -13,6 +13,8 @@ weight: 301 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. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/log2.md b/content/v2.0/reference/flux/functions/math/log2.md index 85451157f..9912dbade 100644 --- a/content/v2.0/reference/flux/functions/math/log2.md +++ b/content/v2.0/reference/flux/functions/math/log2.md @@ -10,6 +10,8 @@ weight: 301 The `math.log2()` function returns the binary logarithm of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/logb.md b/content/v2.0/reference/flux/functions/math/logb.md index 9841dc640..49d60a730 100644 --- a/content/v2.0/reference/flux/functions/math/logb.md +++ b/content/v2.0/reference/flux/functions/math/logb.md @@ -10,6 +10,8 @@ weight: 301 The `math.logb()` function returns the binary exponent of `x`. +_**Output data type:** Float_ + ```js import "math" 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 4a1d5cd82..2ca93596c 100644 --- a/content/v2.0/reference/flux/functions/math/m_max.md +++ b/content/v2.0/reference/flux/functions/math/m_max.md @@ -10,6 +10,8 @@ weight: 301 The `math.m_max()` function returns the larger of `x` or `y`. +_**Output data type:** Float_ + ```js import "math" 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 d9e64fede..2f4cb4487 100644 --- a/content/v2.0/reference/flux/functions/math/m_min.md +++ b/content/v2.0/reference/flux/functions/math/m_min.md @@ -10,6 +10,8 @@ weight: 301 The `math.m_min()` function returns the smaller of `x` or `y`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/mod.md b/content/v2.0/reference/flux/functions/math/mod.md index 481d9826a..bbaf10e32 100644 --- a/content/v2.0/reference/flux/functions/math/mod.md +++ b/content/v2.0/reference/flux/functions/math/mod.md @@ -13,6 +13,8 @@ weight: 301 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`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/nan.md b/content/v2.0/reference/flux/functions/math/nan.md index b5491b92b..8dfb9de71 100644 --- a/content/v2.0/reference/flux/functions/math/nan.md +++ b/content/v2.0/reference/flux/functions/math/nan.md @@ -10,6 +10,8 @@ weight: 301 The `math.NaN()` function returns an IEEE 754 “not-a-number” value. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/nextafter.md b/content/v2.0/reference/flux/functions/math/nextafter.md index 53a5864aa..6c297d1ce 100644 --- a/content/v2.0/reference/flux/functions/math/nextafter.md +++ b/content/v2.0/reference/flux/functions/math/nextafter.md @@ -10,6 +10,8 @@ weight: 301 The `math.nextafter()` function returns the next representable float value after `x` towards `y`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/pow.md b/content/v2.0/reference/flux/functions/math/pow.md index 688e98eb8..6b2cd61a4 100644 --- a/content/v2.0/reference/flux/functions/math/pow.md +++ b/content/v2.0/reference/flux/functions/math/pow.md @@ -10,6 +10,8 @@ weight: 301 The `math.pow()` function returns `x**y`, the base-x exponential of y. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/pow10.md b/content/v2.0/reference/flux/functions/math/pow10.md index 2a846a890..91ee578d0 100644 --- a/content/v2.0/reference/flux/functions/math/pow10.md +++ b/content/v2.0/reference/flux/functions/math/pow10.md @@ -10,6 +10,8 @@ weight: 301 The `math.pow10()` function returns `10**n`, the base-10 exponential of `n`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/remainder.md b/content/v2.0/reference/flux/functions/math/remainder.md index bedf246ab..a1aaec81d 100644 --- a/content/v2.0/reference/flux/functions/math/remainder.md +++ b/content/v2.0/reference/flux/functions/math/remainder.md @@ -10,6 +10,8 @@ weight: 301 The `math.remainder()` function returns the IEEE 754 floating-point remainder of `x / y`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/round.md b/content/v2.0/reference/flux/functions/math/round.md index 8c335486b..6a576622f 100644 --- a/content/v2.0/reference/flux/functions/math/round.md +++ b/content/v2.0/reference/flux/functions/math/round.md @@ -10,6 +10,8 @@ weight: 301 The `math.round()` function returns the nearest integer, rounding half away from zero. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/roundtoeven.md b/content/v2.0/reference/flux/functions/math/roundtoeven.md index d295c7364..cefa00da3 100644 --- a/content/v2.0/reference/flux/functions/math/roundtoeven.md +++ b/content/v2.0/reference/flux/functions/math/roundtoeven.md @@ -10,6 +10,8 @@ weight: 301 The `math.roundtoeven()` function returns the nearest integer, rounding ties to even. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/sin.md b/content/v2.0/reference/flux/functions/math/sin.md index dd3748a43..5d251fb24 100644 --- a/content/v2.0/reference/flux/functions/math/sin.md +++ b/content/v2.0/reference/flux/functions/math/sin.md @@ -10,6 +10,8 @@ weight: 301 The `math.sin()` function returns the sine of the radian argument `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/sinh.md b/content/v2.0/reference/flux/functions/math/sinh.md index bedfc6a00..18c703c04 100644 --- a/content/v2.0/reference/flux/functions/math/sinh.md +++ b/content/v2.0/reference/flux/functions/math/sinh.md @@ -10,6 +10,8 @@ weight: 301 The `math.sinh()` function returns the hyperbolic sine of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/sqrt.md b/content/v2.0/reference/flux/functions/math/sqrt.md index ee974c9d7..33798b0f1 100644 --- a/content/v2.0/reference/flux/functions/math/sqrt.md +++ b/content/v2.0/reference/flux/functions/math/sqrt.md @@ -10,6 +10,8 @@ weight: 301 The `math.sqrt()` function returns the square root of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/tan.md b/content/v2.0/reference/flux/functions/math/tan.md index f74fef5f1..522bab4f5 100644 --- a/content/v2.0/reference/flux/functions/math/tan.md +++ b/content/v2.0/reference/flux/functions/math/tan.md @@ -10,6 +10,8 @@ weight: 301 The `math.tan()` function returns the tangent of the radian argument `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/tanh.md b/content/v2.0/reference/flux/functions/math/tanh.md index cbb72fa8b..798345e03 100644 --- a/content/v2.0/reference/flux/functions/math/tanh.md +++ b/content/v2.0/reference/flux/functions/math/tanh.md @@ -10,6 +10,8 @@ weight: 301 The `math.tanh()` function returns the hyperbolic tangent of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/trunc.md b/content/v2.0/reference/flux/functions/math/trunc.md index 9b14fff45..795236433 100644 --- a/content/v2.0/reference/flux/functions/math/trunc.md +++ b/content/v2.0/reference/flux/functions/math/trunc.md @@ -10,6 +10,8 @@ weight: 301 The `math.trunc()` function returns the integer value of `x`. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/y0.md b/content/v2.0/reference/flux/functions/math/y0.md index e2a029292..4cc5338c6 100644 --- a/content/v2.0/reference/flux/functions/math/y0.md +++ b/content/v2.0/reference/flux/functions/math/y0.md @@ -10,6 +10,8 @@ weight: 301 The `math.y0()` function returns the order-zero Bessel function of the second kind. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/y1.md b/content/v2.0/reference/flux/functions/math/y1.md index e8c472532..b3fcc7deb 100644 --- a/content/v2.0/reference/flux/functions/math/y1.md +++ b/content/v2.0/reference/flux/functions/math/y1.md @@ -10,6 +10,8 @@ weight: 301 The `math.y1()` function returns the order-one Bessel function of the second kind. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/math/yn.md b/content/v2.0/reference/flux/functions/math/yn.md index a5e496c0d..a110c88bd 100644 --- a/content/v2.0/reference/flux/functions/math/yn.md +++ b/content/v2.0/reference/flux/functions/math/yn.md @@ -10,6 +10,8 @@ weight: 301 The `math.yn()` function returns the order-n Bessel function of the second kind. +_**Output data type:** Float_ + ```js import "math" diff --git a/content/v2.0/reference/flux/functions/strings/_index.md b/content/v2.0/reference/flux/functions/strings/_index.md index 51401ef81..282d159e8 100644 --- a/content/v2.0/reference/flux/functions/strings/_index.md +++ b/content/v2.0/reference/flux/functions/strings/_index.md @@ -1,8 +1,8 @@ --- title: Flux strings package description: > - The Flux string package provides functions for manipulating strings in Flux. - To use them, import the `strings` package. + The Flux string package provides functions to manipulate UTF-8 encoded strings. + Import the `strings` package. menu: v2_0_ref: name: Strings @@ -11,8 +11,8 @@ weight: 204 v2.0/tags: [strings, functions, package] --- -String functions provide tools for manipulating strings in Flux. -To use them, import the `strings` package: +The Flux string package provides functions to manipulate UTF-8 encoded strings. +Import the `strings` package: ```js import "strings" diff --git a/content/v2.0/reference/flux/functions/testing/_index.md b/content/v2.0/reference/flux/functions/testing/_index.md index 726a295a1..1c885ae04 100644 --- a/content/v2.0/reference/flux/functions/testing/_index.md +++ b/content/v2.0/reference/flux/functions/testing/_index.md @@ -1,8 +1,8 @@ --- title: Flux testing package description: > - The Flux testing package includes functions that test piped-forward data in specific ways. - To use them, import the `testing` package. + The Flux testing package provides functions that test piped-forward data in specific ways. + Import the `testing` package. menu: v2_0_ref: name: Testing @@ -12,7 +12,7 @@ v2.0/tags: [testing, functions, package] --- Flux testing functions test piped-forward data in specific ways and return errors if the tests fail. -To use them, import the `testing` package: +Import the `testing` package: ```js import "testing" From 3fe838f600adf8e05b01f517b49d34e8396bd6e7 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 13 Mar 2019 16:01:36 -0500 Subject: [PATCH 07/13] added return values to all math function examples --- content/v2.0/reference/flux/functions/math/acosh.md | 2 ++ content/v2.0/reference/flux/functions/math/asin.md | 2 ++ content/v2.0/reference/flux/functions/math/asinh.md | 2 ++ content/v2.0/reference/flux/functions/math/atan.md | 4 +++- content/v2.0/reference/flux/functions/math/atan2.md | 2 ++ content/v2.0/reference/flux/functions/math/atanh.md | 2 ++ content/v2.0/reference/flux/functions/math/cbrt.md | 4 +++- content/v2.0/reference/flux/functions/math/ceil.md | 2 ++ content/v2.0/reference/flux/functions/math/copysign.md | 2 ++ content/v2.0/reference/flux/functions/math/cos.md | 2 ++ content/v2.0/reference/flux/functions/math/cosh.md | 2 ++ content/v2.0/reference/flux/functions/math/dim.md | 2 ++ content/v2.0/reference/flux/functions/math/erf.md | 2 ++ content/v2.0/reference/flux/functions/math/erfc.md | 2 ++ content/v2.0/reference/flux/functions/math/erfcinv.md | 2 ++ content/v2.0/reference/flux/functions/math/erfinv.md | 2 ++ content/v2.0/reference/flux/functions/math/exp.md | 2 ++ content/v2.0/reference/flux/functions/math/exp2.md | 2 ++ content/v2.0/reference/flux/functions/math/expm1.md | 4 +++- content/v2.0/reference/flux/functions/math/float64bits.md | 2 ++ content/v2.0/reference/flux/functions/math/floor.md | 2 ++ content/v2.0/reference/flux/functions/math/gamma.md | 2 ++ content/v2.0/reference/flux/functions/math/hypot.md | 2 ++ content/v2.0/reference/flux/functions/math/ilogb.md | 4 +++- content/v2.0/reference/flux/functions/math/isinf.md | 2 ++ content/v2.0/reference/flux/functions/math/isnan.md | 2 ++ content/v2.0/reference/flux/functions/math/j0.md | 2 ++ content/v2.0/reference/flux/functions/math/j1.md | 2 ++ content/v2.0/reference/flux/functions/math/jn.md | 2 ++ content/v2.0/reference/flux/functions/math/ldexp.md | 2 ++ content/v2.0/reference/flux/functions/math/log.md | 2 ++ content/v2.0/reference/flux/functions/math/log10.md | 2 ++ content/v2.0/reference/flux/functions/math/log1p.md | 2 ++ content/v2.0/reference/flux/functions/math/log2.md | 2 ++ content/v2.0/reference/flux/functions/math/logb.md | 2 ++ content/v2.0/reference/flux/functions/math/m_inf.md | 2 ++ content/v2.0/reference/flux/functions/math/m_max.md | 2 ++ content/v2.0/reference/flux/functions/math/m_min.md | 2 ++ content/v2.0/reference/flux/functions/math/mod.md | 2 ++ content/v2.0/reference/flux/functions/math/nan.md | 4 ++-- content/v2.0/reference/flux/functions/math/nextafter.md | 2 ++ content/v2.0/reference/flux/functions/math/pow.md | 2 ++ content/v2.0/reference/flux/functions/math/pow10.md | 2 ++ content/v2.0/reference/flux/functions/math/remainder.md | 2 ++ content/v2.0/reference/flux/functions/math/round.md | 2 ++ content/v2.0/reference/flux/functions/math/roundtoeven.md | 4 ++++ content/v2.0/reference/flux/functions/math/signbit.md | 2 ++ content/v2.0/reference/flux/functions/math/sin.md | 2 ++ content/v2.0/reference/flux/functions/math/sinh.md | 2 ++ content/v2.0/reference/flux/functions/math/sqrt.md | 2 ++ content/v2.0/reference/flux/functions/math/tan.md | 2 ++ content/v2.0/reference/flux/functions/math/tanh.md | 4 +++- content/v2.0/reference/flux/functions/math/trunc.md | 2 ++ content/v2.0/reference/flux/functions/math/y0.md | 2 ++ content/v2.0/reference/flux/functions/math/y1.md | 2 ++ content/v2.0/reference/flux/functions/math/yn.md | 2 ++ 56 files changed, 119 insertions(+), 7 deletions(-) diff --git a/content/v2.0/reference/flux/functions/math/acosh.md b/content/v2.0/reference/flux/functions/math/acosh.md index 67203611d..3d8626f7e 100644 --- a/content/v2.0/reference/flux/functions/math/acosh.md +++ b/content/v2.0/reference/flux/functions/math/acosh.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.acosh(x: 1.22) + +// Returns 0.6517292837263385 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/asin.md b/content/v2.0/reference/flux/functions/math/asin.md index da64dccdf..199777a06 100644 --- a/content/v2.0/reference/flux/functions/math/asin.md +++ b/content/v2.0/reference/flux/functions/math/asin.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.asin(x: 0.22) + +// Returns 0.22181447049679442 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/asinh.md b/content/v2.0/reference/flux/functions/math/asinh.md index 1d6206dca..9800d3ad0 100644 --- a/content/v2.0/reference/flux/functions/math/asinh.md +++ b/content/v2.0/reference/flux/functions/math/asinh.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.asinh(x: 3.14) + +// Returns 1.8618125572133835 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/atan.md b/content/v2.0/reference/flux/functions/math/atan.md index 379c019ad..7fa91fd18 100644 --- a/content/v2.0/reference/flux/functions/math/atan.md +++ b/content/v2.0/reference/flux/functions/math/atan.md @@ -15,7 +15,9 @@ _**Output data type:** Float_ ```js import "math" -math.atan( EXAMPLE ) +math.atan(x: 3.14) + +// Returns 1.262480664599468 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/atan2.md b/content/v2.0/reference/flux/functions/math/atan2.md index 4236c6f5d..e5c872679 100644 --- a/content/v2.0/reference/flux/functions/math/atan2.md +++ b/content/v2.0/reference/flux/functions/math/atan2.md @@ -17,6 +17,8 @@ _**Output data type:** Float_ import "math" math.atan2(y: 1.22, x: 3.14) + +// Returns 0.3705838802763881 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/atanh.md b/content/v2.0/reference/flux/functions/math/atanh.md index fbba09719..d3a551543 100644 --- a/content/v2.0/reference/flux/functions/math/atanh.md +++ b/content/v2.0/reference/flux/functions/math/atanh.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.atanh(x: 0.22) + +// Returns 0.22365610902183242 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/cbrt.md b/content/v2.0/reference/flux/functions/math/cbrt.md index 5d34a8c2f..6054dacf3 100644 --- a/content/v2.0/reference/flux/functions/math/cbrt.md +++ b/content/v2.0/reference/flux/functions/math/cbrt.md @@ -15,7 +15,9 @@ _**Output data type:** Float_ ```js import "math" -math.cbrt(x: 1728) +math.cbrt(x: 1728.0) + +// Returns 12.0 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/ceil.md b/content/v2.0/reference/flux/functions/math/ceil.md index 82c0792a2..091ffbedb 100644 --- a/content/v2.0/reference/flux/functions/math/ceil.md +++ b/content/v2.0/reference/flux/functions/math/ceil.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.ceil(x: 3.14) + +// Returns 4.0 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/copysign.md b/content/v2.0/reference/flux/functions/math/copysign.md index 00b12df1c..26466573f 100644 --- a/content/v2.0/reference/flux/functions/math/copysign.md +++ b/content/v2.0/reference/flux/functions/math/copysign.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.copysign(x: 1.0, y: 2.0) + +// Returns 1.0 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/cos.md b/content/v2.0/reference/flux/functions/math/cos.md index 852e3f3dc..7c1b6bd2f 100644 --- a/content/v2.0/reference/flux/functions/math/cos.md +++ b/content/v2.0/reference/flux/functions/math/cos.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.cos(x: 3.14) + +// Returns -0.9999987317275396 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/cosh.md b/content/v2.0/reference/flux/functions/math/cosh.md index 8dfe74138..22fff8771 100644 --- a/content/v2.0/reference/flux/functions/math/cosh.md +++ b/content/v2.0/reference/flux/functions/math/cosh.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.cosh(x: 1.22) + +// Returns 1.8412089502726743 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/dim.md b/content/v2.0/reference/flux/functions/math/dim.md index 7e64fed31..1bda0c5a8 100644 --- a/content/v2.0/reference/flux/functions/math/dim.md +++ b/content/v2.0/reference/flux/functions/math/dim.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.dim(x: 12.2, y: 8.1) + +// Returns 4.1 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/erf.md b/content/v2.0/reference/flux/functions/math/erf.md index f757109aa..ebc8cca16 100644 --- a/content/v2.0/reference/flux/functions/math/erf.md +++ b/content/v2.0/reference/flux/functions/math/erf.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.erf(x: 22.6) + +// Returns 1.0 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/erfc.md b/content/v2.0/reference/flux/functions/math/erfc.md index f96183ff8..a2a7e2ac5 100644 --- a/content/v2.0/reference/flux/functions/math/erfc.md +++ b/content/v2.0/reference/flux/functions/math/erfc.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.erfc(x: 22.6) + +// Returns 3.7726189138490583e-224 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/erfcinv.md b/content/v2.0/reference/flux/functions/math/erfcinv.md index 3dc70892e..c5f2c473f 100644 --- a/content/v2.0/reference/flux/functions/math/erfcinv.md +++ b/content/v2.0/reference/flux/functions/math/erfcinv.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.erfcinv(x: 0.42345) + +// Returns 0.5660037715858239 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/erfinv.md b/content/v2.0/reference/flux/functions/math/erfinv.md index bdf9b3f32..2c4511397 100644 --- a/content/v2.0/reference/flux/functions/math/erfinv.md +++ b/content/v2.0/reference/flux/functions/math/erfinv.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.erfinv(x: 0.22) + +// Returns 0.19750838337227364 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/exp.md b/content/v2.0/reference/flux/functions/math/exp.md index 74c95d780..14228533a 100644 --- a/content/v2.0/reference/flux/functions/math/exp.md +++ b/content/v2.0/reference/flux/functions/math/exp.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.exp(x: 21.0) + +// Returns 1.3188157344832146e+09 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/exp2.md b/content/v2.0/reference/flux/functions/math/exp2.md index 29733093f..d66b572d0 100644 --- a/content/v2.0/reference/flux/functions/math/exp2.md +++ b/content/v2.0/reference/flux/functions/math/exp2.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.exp2(x: 21.0) + +// Returns 2.097152e+06 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/expm1.md b/content/v2.0/reference/flux/functions/math/expm1.md index c1040cd99..953926420 100644 --- a/content/v2.0/reference/flux/functions/math/expm1.md +++ b/content/v2.0/reference/flux/functions/math/expm1.md @@ -18,7 +18,9 @@ _**Output data type:** Float_ ```js import "math" -math.expm1( EXAMPLE ) +math.expm1(x: 1.22) + +// Returns 2.3871877336213343 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/float64bits.md b/content/v2.0/reference/flux/functions/math/float64bits.md index 5e63f7af4..95a16dcb9 100644 --- a/content/v2.0/reference/flux/functions/math/float64bits.md +++ b/content/v2.0/reference/flux/functions/math/float64bits.md @@ -16,6 +16,8 @@ _**Output data type:** UInteger_ import "math" math.float64bits(f: 1234.56) + +// Returns 4653144467747100426 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/floor.md b/content/v2.0/reference/flux/functions/math/floor.md index de26e0b4f..bea8631d9 100644 --- a/content/v2.0/reference/flux/functions/math/floor.md +++ b/content/v2.0/reference/flux/functions/math/floor.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.floor(x: 1.22) + +// Returns 1.0 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/gamma.md b/content/v2.0/reference/flux/functions/math/gamma.md index f9a1ae251..744d5cdc8 100644 --- a/content/v2.0/reference/flux/functions/math/gamma.md +++ b/content/v2.0/reference/flux/functions/math/gamma.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.gamma(x: 2.12) + +// Returns 1.056821007887572 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/hypot.md b/content/v2.0/reference/flux/functions/math/hypot.md index 783c70c07..17cf5b1f4 100644 --- a/content/v2.0/reference/flux/functions/math/hypot.md +++ b/content/v2.0/reference/flux/functions/math/hypot.md @@ -19,6 +19,8 @@ _**Output data type:** Float_ import "math" math.hypot(p: 2.0, q: 5.0) + +// Returns 5.385164807134505 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/ilogb.md b/content/v2.0/reference/flux/functions/math/ilogb.md index 616310abd..22b87b558 100644 --- a/content/v2.0/reference/flux/functions/math/ilogb.md +++ b/content/v2.0/reference/flux/functions/math/ilogb.md @@ -15,7 +15,9 @@ _**Output data type:** Integer_ ```js import "math" -math.ilogb(x: 1.23) +math.ilogb(x: 123.45) + +// Returns 6.0 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/isinf.md b/content/v2.0/reference/flux/functions/math/isinf.md index ec11f544c..900dc54cf 100644 --- a/content/v2.0/reference/flux/functions/math/isinf.md +++ b/content/v2.0/reference/flux/functions/math/isinf.md @@ -20,6 +20,8 @@ _**Output data type:** Boolean_ import "math" math.isInf(f: 2.12, sign: 3) + +// Returns false ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/isnan.md b/content/v2.0/reference/flux/functions/math/isnan.md index 0fe933e36..dfcf73ae1 100644 --- a/content/v2.0/reference/flux/functions/math/isnan.md +++ b/content/v2.0/reference/flux/functions/math/isnan.md @@ -16,6 +16,8 @@ _**Output data type:** Boolean_ import "math" math.isNaN(f: 12.345) + +// Returns false ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/j0.md b/content/v2.0/reference/flux/functions/math/j0.md index 75a89d6cb..74338fd03 100644 --- a/content/v2.0/reference/flux/functions/math/j0.md +++ b/content/v2.0/reference/flux/functions/math/j0.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.j0(x: 1.23) + +// Returns 0.656070571706025 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/j1.md b/content/v2.0/reference/flux/functions/math/j1.md index ff3816700..594b3c81d 100644 --- a/content/v2.0/reference/flux/functions/math/j1.md +++ b/content/v2.0/reference/flux/functions/math/j1.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.j1(x: 1.23) + +// Returns 0.5058005726280961 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/jn.md b/content/v2.0/reference/flux/functions/math/jn.md index 85e2d0da1..80e0f6acf 100644 --- a/content/v2.0/reference/flux/functions/math/jn.md +++ b/content/v2.0/reference/flux/functions/math/jn.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.jn(n: 2, x: 1.23) + +// Returns 0.16636938378681407 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/ldexp.md b/content/v2.0/reference/flux/functions/math/ldexp.md index 3f8b54224..8ecfb26eb 100644 --- a/content/v2.0/reference/flux/functions/math/ldexp.md +++ b/content/v2.0/reference/flux/functions/math/ldexp.md @@ -17,6 +17,8 @@ _**Output data type:** Float_ import "math" math.ldexp(frac: 0.5, exp: 6) + +// Returns 32.0 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/log.md b/content/v2.0/reference/flux/functions/math/log.md index 6eb5e72ec..84eb17fc8 100644 --- a/content/v2.0/reference/flux/functions/math/log.md +++ b/content/v2.0/reference/flux/functions/math/log.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.log(x: 3.14) + +// Returns 1.144222799920162 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/log10.md b/content/v2.0/reference/flux/functions/math/log10.md index 4efd96e84..1b3a7ed72 100644 --- a/content/v2.0/reference/flux/functions/math/log10.md +++ b/content/v2.0/reference/flux/functions/math/log10.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.log10(x: 3.14) + +// Returns 0.4969296480732149 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/log1p.md b/content/v2.0/reference/flux/functions/math/log1p.md index 0f52fbb4d..463ccc078 100644 --- a/content/v2.0/reference/flux/functions/math/log1p.md +++ b/content/v2.0/reference/flux/functions/math/log1p.md @@ -19,6 +19,8 @@ _**Output data type:** Float_ import "math" math.log1p(x: 0.56) + +// Returns 0.44468582126144574 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/log2.md b/content/v2.0/reference/flux/functions/math/log2.md index 9912dbade..a44fd54f0 100644 --- a/content/v2.0/reference/flux/functions/math/log2.md +++ b/content/v2.0/reference/flux/functions/math/log2.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.log2(x: 3.14) + +// Returns 1.6507645591169022 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/logb.md b/content/v2.0/reference/flux/functions/math/logb.md index 49d60a730..cd5049a70 100644 --- a/content/v2.0/reference/flux/functions/math/logb.md +++ b/content/v2.0/reference/flux/functions/math/logb.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.logb(x: 3.14) + +// Returns 1.0 ``` ## Parameters 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 37ccd65e1..da77b79ec 100644 --- a/content/v2.0/reference/flux/functions/math/m_inf.md +++ b/content/v2.0/reference/flux/functions/math/m_inf.md @@ -18,6 +18,8 @@ _**Output data type:** Float_ import "math" math.m_inf(sign: 1) + +// Returns +Inf ``` ## Parameters 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 2ca93596c..3dd4c422e 100644 --- a/content/v2.0/reference/flux/functions/math/m_max.md +++ b/content/v2.0/reference/flux/functions/math/m_max.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.m_max(x: 1.23, y: 4.56) + +// Returns 4.56 ``` ## Parameters 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 2f4cb4487..404982967 100644 --- a/content/v2.0/reference/flux/functions/math/m_min.md +++ b/content/v2.0/reference/flux/functions/math/m_min.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.m_min(x: 1.23, y: 4.56) + +// Returns 1.23 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/mod.md b/content/v2.0/reference/flux/functions/math/mod.md index bbaf10e32..e23493865 100644 --- a/content/v2.0/reference/flux/functions/math/mod.md +++ b/content/v2.0/reference/flux/functions/math/mod.md @@ -19,6 +19,8 @@ _**Output data type:** Float_ import "math" math.mod(x: 1.23, y: 4.56) + +// Returns 1.23 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/nan.md b/content/v2.0/reference/flux/functions/math/nan.md index 8dfb9de71..ebb54f06b 100644 --- a/content/v2.0/reference/flux/functions/math/nan.md +++ b/content/v2.0/reference/flux/functions/math/nan.md @@ -10,10 +10,10 @@ weight: 301 The `math.NaN()` function returns an IEEE 754 “not-a-number” value. -_**Output data type:** Float_ - ```js import "math" math.NaN() + +// Returns NaN ``` diff --git a/content/v2.0/reference/flux/functions/math/nextafter.md b/content/v2.0/reference/flux/functions/math/nextafter.md index 6c297d1ce..bb6f0ae27 100644 --- a/content/v2.0/reference/flux/functions/math/nextafter.md +++ b/content/v2.0/reference/flux/functions/math/nextafter.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.nextafter(x: 1.23, y: 4.56) + +// Returns 1.2300000000000002 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/pow.md b/content/v2.0/reference/flux/functions/math/pow.md index 6b2cd61a4..3921a8fa1 100644 --- a/content/v2.0/reference/flux/functions/math/pow.md +++ b/content/v2.0/reference/flux/functions/math/pow.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.pow(x: 2.0, y: 3.0) + +// Returns 8.0 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/pow10.md b/content/v2.0/reference/flux/functions/math/pow10.md index 91ee578d0..bfd8f1f63 100644 --- a/content/v2.0/reference/flux/functions/math/pow10.md +++ b/content/v2.0/reference/flux/functions/math/pow10.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.pow10(n: 3) + +// Returns 1000 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/remainder.md b/content/v2.0/reference/flux/functions/math/remainder.md index a1aaec81d..41d32767c 100644 --- a/content/v2.0/reference/flux/functions/math/remainder.md +++ b/content/v2.0/reference/flux/functions/math/remainder.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.remainder(x: 21.0, y: 4.0) + +// Returns 1.0 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/round.md b/content/v2.0/reference/flux/functions/math/round.md index 6a576622f..92e040360 100644 --- a/content/v2.0/reference/flux/functions/math/round.md +++ b/content/v2.0/reference/flux/functions/math/round.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.round(x: 2.12) + +// Returns 2.0 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/roundtoeven.md b/content/v2.0/reference/flux/functions/math/roundtoeven.md index cefa00da3..5f78da74a 100644 --- a/content/v2.0/reference/flux/functions/math/roundtoeven.md +++ b/content/v2.0/reference/flux/functions/math/roundtoeven.md @@ -16,6 +16,10 @@ _**Output data type:** Float_ import "math" math.roundtoeven(x: 3.14) +// Returns 3.0 + +math.roundtoeven(x: 3.5) +// Returns 4.0 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/signbit.md b/content/v2.0/reference/flux/functions/math/signbit.md index 7c8bd0707..e85ec18e8 100644 --- a/content/v2.0/reference/flux/functions/math/signbit.md +++ b/content/v2.0/reference/flux/functions/math/signbit.md @@ -16,6 +16,8 @@ _**Output data type:** Boolean_ import "math" math.signbit(x: -1.2) + +// Returns true ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/sin.md b/content/v2.0/reference/flux/functions/math/sin.md index 5d251fb24..033a005e8 100644 --- a/content/v2.0/reference/flux/functions/math/sin.md +++ b/content/v2.0/reference/flux/functions/math/sin.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.sin(x: 3.14) + +// Returns 0.0015926529164868282 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/sinh.md b/content/v2.0/reference/flux/functions/math/sinh.md index 18c703c04..7dd4def04 100644 --- a/content/v2.0/reference/flux/functions/math/sinh.md +++ b/content/v2.0/reference/flux/functions/math/sinh.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.sinh(x: 1.23) + +// Returns 1.564468479304407 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/sqrt.md b/content/v2.0/reference/flux/functions/math/sqrt.md index 33798b0f1..f09e59fa2 100644 --- a/content/v2.0/reference/flux/functions/math/sqrt.md +++ b/content/v2.0/reference/flux/functions/math/sqrt.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.sqrt(x: 4.0) + +// Returns 2.0 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/tan.md b/content/v2.0/reference/flux/functions/math/tan.md index 522bab4f5..3fbb9d970 100644 --- a/content/v2.0/reference/flux/functions/math/tan.md +++ b/content/v2.0/reference/flux/functions/math/tan.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.tan(x: 3.14) + +// Returns -0.001592654936407223 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/tanh.md b/content/v2.0/reference/flux/functions/math/tanh.md index 798345e03..a468720b0 100644 --- a/content/v2.0/reference/flux/functions/math/tanh.md +++ b/content/v2.0/reference/flux/functions/math/tanh.md @@ -15,7 +15,9 @@ _**Output data type:** Float_ ```js import "math" -math.tanh(x: 0.0) +math.tanh(x: 1.23) + +// Returns 0.8425793256589296 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/trunc.md b/content/v2.0/reference/flux/functions/math/trunc.md index 795236433..e787dbd80 100644 --- a/content/v2.0/reference/flux/functions/math/trunc.md +++ b/content/v2.0/reference/flux/functions/math/trunc.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.trunc(x: 3.14) + +// Returns 3.0 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/y0.md b/content/v2.0/reference/flux/functions/math/y0.md index 4cc5338c6..7dc7fab13 100644 --- a/content/v2.0/reference/flux/functions/math/y0.md +++ b/content/v2.0/reference/flux/functions/math/y0.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.y0(x: 3.14) + +// Returns 0.3289375969127807 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/y1.md b/content/v2.0/reference/flux/functions/math/y1.md index b3fcc7deb..b16a38c99 100644 --- a/content/v2.0/reference/flux/functions/math/y1.md +++ b/content/v2.0/reference/flux/functions/math/y1.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.y1(x: 3.14) + +// Returns 0.35853138083924085 ``` ## Parameters diff --git a/content/v2.0/reference/flux/functions/math/yn.md b/content/v2.0/reference/flux/functions/math/yn.md index a110c88bd..56b951ca5 100644 --- a/content/v2.0/reference/flux/functions/math/yn.md +++ b/content/v2.0/reference/flux/functions/math/yn.md @@ -16,6 +16,8 @@ _**Output data type:** Float_ import "math" math.yn(n: 3, x: 3.14) + +// Returns -0.4866506930335083 ``` ## Parameters From 8cb6bf5504fb2de844c178b0e0cc2976c5135612 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 13 Mar 2019 16:22:48 -0500 Subject: [PATCH 08/13] updated math function docs to address PR feedback --- content/v2.0/reference/flux/functions/built-in/_index.md | 4 ++-- content/v2.0/reference/flux/functions/math/acos.md | 5 ++--- content/v2.0/reference/flux/functions/math/acosh.md | 1 - content/v2.0/reference/flux/functions/math/asin.md | 6 +++--- content/v2.0/reference/flux/functions/math/atan.md | 4 ++-- content/v2.0/reference/flux/functions/math/atan2.md | 8 +++++--- content/v2.0/reference/flux/functions/math/dim.md | 2 +- content/v2.0/reference/flux/functions/math/hypot.md | 6 +++--- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/content/v2.0/reference/flux/functions/built-in/_index.md b/content/v2.0/reference/flux/functions/built-in/_index.md index f1c635fdf..0b60a1afa 100644 --- a/content/v2.0/reference/flux/functions/built-in/_index.md +++ b/content/v2.0/reference/flux/functions/built-in/_index.md @@ -1,7 +1,7 @@ --- title: Flux built-in functions description: > - Built-in functions provide a necessary foundation for working with data using Flux. + Built-in functions provide a foundation for working with data using Flux. They do not require an import statement and are usable without any extra setup. menu: v2_0_ref: @@ -11,7 +11,7 @@ weight: 201 v2.0/tags: [built-in, functions, package] --- -Built-in functions provide a necessary foundation for working with data using Flux. +Built-in functions provide a foundation for working with data using Flux. Because these functions are "built-in," they do not require an `import` statement and are usable without any extra setup. Built-in functions are grouped into the following categories: diff --git a/content/v2.0/reference/flux/functions/math/acos.md b/content/v2.0/reference/flux/functions/math/acos.md index 147fceaa4..5b6b88fd8 100644 --- a/content/v2.0/reference/flux/functions/math/acos.md +++ b/content/v2.0/reference/flux/functions/math/acos.md @@ -1,6 +1,6 @@ --- title: math.acos() function -description: The math.acos() function returns the arccosine, in radians, of `x`. +description: The math.acos() function returns the arccosine of `x` in radians. menu: v2_0_ref: name: math.acos @@ -8,7 +8,7 @@ menu: weight: 301 --- -The `math.acos()` function returns the arccosine, in radians, of `x`. +The `math.acos()` function returns the arccosine of `x` in radians. _**Output data type:** Float_ @@ -23,7 +23,6 @@ math.acos(x: 0.22) ## Parameters ### x -The value used in the operation. `x` should be greater than -1 and less than 1. Otherwise, the operation will return `NaN`. diff --git a/content/v2.0/reference/flux/functions/math/acosh.md b/content/v2.0/reference/flux/functions/math/acosh.md index 3d8626f7e..95cead337 100644 --- a/content/v2.0/reference/flux/functions/math/acosh.md +++ b/content/v2.0/reference/flux/functions/math/acosh.md @@ -23,7 +23,6 @@ math.acosh(x: 1.22) ## Parameters ### x -The value used in the operation. `x` should be greater than 1. If less than 1, the operation will return `NaN`. diff --git a/content/v2.0/reference/flux/functions/math/asin.md b/content/v2.0/reference/flux/functions/math/asin.md index 199777a06..614e12174 100644 --- a/content/v2.0/reference/flux/functions/math/asin.md +++ b/content/v2.0/reference/flux/functions/math/asin.md @@ -1,6 +1,6 @@ --- title: math.asin() function -description: The math.asin() function returns the arcsine, in radians, of `x`. +description: The math.asin() function returns the arcsine of `x` in radians. menu: v2_0_ref: name: math.asin @@ -8,7 +8,7 @@ menu: weight: 301 --- -The `math.asin()` function returns the arcsine, in radians, of `x`. +The `math.asin()` function returns the arcsine of `x` in radians. _**Output data type:** Float_ @@ -25,7 +25,7 @@ math.asin(x: 0.22) ### x The value used in the operation. `x` should be greater than -1 and less than 1. -Otherwise, the operation will return `NaN`. +Otherwise, the function will return `NaN`. _**Data type:** Float_ diff --git a/content/v2.0/reference/flux/functions/math/atan.md b/content/v2.0/reference/flux/functions/math/atan.md index 7fa91fd18..524a3fe96 100644 --- a/content/v2.0/reference/flux/functions/math/atan.md +++ b/content/v2.0/reference/flux/functions/math/atan.md @@ -1,6 +1,6 @@ --- title: math.atan() function -description: The math.atan() function returns the arctangent, in radians, of `x`. +description: The math.atan() function returns the arctangent of `x` in radians. menu: v2_0_ref: name: math.atan @@ -8,7 +8,7 @@ menu: weight: 301 --- -The `math.atan()` function returns the arctangent, in radians, of `x`. +The `math.atan()` function returns the arctangent of `x` in radians. _**Output data type:** Float_ diff --git a/content/v2.0/reference/flux/functions/math/atan2.md b/content/v2.0/reference/flux/functions/math/atan2.md index e5c872679..1556dcbf5 100644 --- a/content/v2.0/reference/flux/functions/math/atan2.md +++ b/content/v2.0/reference/flux/functions/math/atan2.md @@ -1,6 +1,8 @@ --- title: math.atan2() function -description: The math.atan2() function returns the arc tangent of `y`/`x`, using the signs of the two to determine the quadrant of the return value. +description: > + The math.atan2() function returns the arc tangent of `y`/`x`, using the signs of + the parameters to determine the quadrant of the return value. menu: v2_0_ref: name: math.atan2 @@ -24,12 +26,12 @@ math.atan2(y: 1.22, x: 3.14) ## Parameters ### y -The Y coordinate used in the operation. +The y coordinate used in the operation. _**Data type:** Float_ ### x -The X coordinate used in the operation. +The x coordinate used in the operation. _**Data type:** Float_ diff --git a/content/v2.0/reference/flux/functions/math/dim.md b/content/v2.0/reference/flux/functions/math/dim.md index 1bda0c5a8..b52a3c8b2 100644 --- a/content/v2.0/reference/flux/functions/math/dim.md +++ b/content/v2.0/reference/flux/functions/math/dim.md @@ -8,7 +8,7 @@ menu: weight: 301 --- -The `math.dim()` function returns the maximum of `x`-`y` or 0. +The `math.dim()` function returns the maximum of `x - y` or 0. _**Output data type:** Float_ diff --git a/content/v2.0/reference/flux/functions/math/hypot.md b/content/v2.0/reference/flux/functions/math/hypot.md index 17cf5b1f4..c9d6af266 100644 --- a/content/v2.0/reference/flux/functions/math/hypot.md +++ b/content/v2.0/reference/flux/functions/math/hypot.md @@ -11,7 +11,7 @@ weight: 301 --- The `math.hypot()` function returns the square root of `p*p + q*q`, -taking care to avoid unnecessary overflow and underflow. +taking care to avoid overflow and underflow. _**Output data type:** Float_ @@ -26,12 +26,12 @@ math.hypot(p: 2.0, q: 5.0) ## Parameters ### p -The P value used in the operation. +The p value used in the operation. _**Data type:** Float_ ### q -The Q value used in the operation. +The q value used in the operation. _**Data type:** Float_ From 9280410d32dcbc87edc06dffea2a9a8963b0d9e9 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 13 Mar 2019 16:33:39 -0500 Subject: [PATCH 09/13] updated download links in getting started to alpha-6 --- content/v2.0/get-started.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/content/v2.0/get-started.md b/content/v2.0/get-started.md index 61e5bbbea..7727af176 100644 --- a/content/v2.0/get-started.md +++ b/content/v2.0/get-started.md @@ -23,7 +23,7 @@ executables, and running the initial setup process. ### Download and install InfluxDB v2.0 alpha Download InfluxDB v2.0 alpha for macOS. -InfluxDB v2.0 alpha (macOS) +InfluxDB v2.0 alpha (macOS) ### Place the executables in your $PATH Unpackage the downloaded archive and place the `influx` and `influxd` executables in your system `$PATH`. @@ -32,10 +32,10 @@ _**Note:** The following commands are examples. Adjust the file paths to your ow ```sh # Unpackage contents to the current working directory -gunzip -c ~/Downloads/influxdb_2.0.0-alpha.5_darwin_amd64.tar.gz | tar xopf - +gunzip -c ~/Downloads/influxdb_2.0.0-alpha.6_darwin_amd64.tar.gz | tar xopf - # Copy the influx and influxd binary to your $PATH -sudo cp influxdb_2.0.0-alpha.5_darwin_amd64/{influx,influxd} /usr/local/bin/ +sudo cp influxdb_2.0.0-alpha.6_darwin_amd64/{influx,influxd} /usr/local/bin/ ``` {{% note %}} @@ -80,8 +80,8 @@ influxd --reporting-disabled ### Download and install InfluxDB v2.0 alpha Download the InfluxDB v2.0 alpha package appropriate for your chipset. -InfluxDB v2.0 alpha (amd64) -InfluxDB v2.0 alpha (arm) +InfluxDB v2.0 alpha (amd64) +InfluxDB v2.0 alpha (arm) ### Place the executables in your $PATH Unpackage the downloaded archive and place the `influx` and `influxd` executables in your system `$PATH`. @@ -90,10 +90,10 @@ _**Note:** The following commands are examples. Adjust the file names, paths, an ```sh # Unpackage contents to the current working directory -tar xvzf path/to/influxdb_2.0.0-alpha.5_linux_amd64.tar.gz +tar xvzf path/to/influxdb_2.0.0-alpha.6_linux_amd64.tar.gz # Copy the influx and influxd binary to your $PATH -sudo cp influxdb_2.0.0-alpha.5_linux_amd64/{influx,influxd} /usr/local/bin/ +sudo cp influxdb_2.0.0-alpha.6_linux_amd64/{influx,influxd} /usr/local/bin/ ``` {{% note %}} From 81690509b74e4252b49a0daf80c098a6cc54823b Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Thu, 14 Mar 2019 07:19:02 -0500 Subject: [PATCH 10/13] updated flux data model doc, updated IMPL callouts --- .../flux/language/assignment-scope.md | 2 +- .../flux/language/built-ins/time-constants.md | 4 ++-- .../reference/flux/language/data-model.md | 22 ++++++++++++++++++- .../flux/language/lexical-elements.md | 16 +++++++------- .../v2.0/reference/flux/language/options.md | 2 +- .../v2.0/reference/flux/language/packages.md | 2 +- content/v2.0/reference/flux/language/types.md | 6 ++--- 7 files changed, 37 insertions(+), 17 deletions(-) diff --git a/content/v2.0/reference/flux/language/assignment-scope.md b/content/v2.0/reference/flux/language/assignment-scope.md index b12863302..d9ffa74ef 100644 --- a/content/v2.0/reference/flux/language/assignment-scope.md +++ b/content/v2.0/reference/flux/language/assignment-scope.md @@ -33,7 +33,7 @@ The package name does not appear in any scope. Its purpose is to identify the files belonging to the same package and to specify the default package name for import declarations. {{% note %}} -To be implemented: [IMPL#247](https://github.com/influxdata/platform/issues/247) Add package/namespace support. +[IMPL#247](https://github.com/influxdata/platform/issues/247) Add package/namespace support. {{% /note %}} ## Variable assignment diff --git a/content/v2.0/reference/flux/language/built-ins/time-constants.md b/content/v2.0/reference/flux/language/built-ins/time-constants.md index c5b7d058d..7d0dae6ac 100644 --- a/content/v2.0/reference/flux/language/built-ins/time-constants.md +++ b/content/v2.0/reference/flux/language/built-ins/time-constants.md @@ -30,7 +30,7 @@ Saturday = 6 ``` {{% note %}} -To be implemented: [IMPL#153](https://github.com/influxdata/flux/issues/153) Add Days of the Week constants +[IMPL#153](https://github.com/influxdata/flux/issues/153) Add Days of the Week constants {{% /note %}} ## Months of the year @@ -52,5 +52,5 @@ December = 12 ``` {{% note %}} -To be implemented: [IMPL#154](https://github.com/influxdata/flux/issues/154) Add Months of the Year constants +[IMPL#154](https://github.com/influxdata/flux/issues/154) Add Months of the Year constants {{% /note %}} diff --git a/content/v2.0/reference/flux/language/data-model.md b/content/v2.0/reference/flux/language/data-model.md index 21cce046e..07b25e8df 100644 --- a/content/v2.0/reference/flux/language/data-model.md +++ b/content/v2.0/reference/flux/language/data-model.md @@ -45,16 +45,36 @@ These common values are referred to as the "group key value" and can be represen A tables schema consists of its group key and its columns' labels and types. +{{% note %}} +[IMPL#463](https://github.com/influxdata/flux/issues/463) Specify the primitive types that make up stream and table types +{{% /note %}} + ## Stream of tables A **stream** represents a potentially unbounded set of tables. A stream is grouped into individual tables using their respective group keys. Tables within a stream each have a unique group key value. +{{% note %}} +[IMPL#463](https://github.com/influxdata/flux/issues/463) Specify the primitive types that make up stream and table types +{{% /note %}} + ## Missing values A record may be missing a value for a specific column. Missing values are represented with a special `null` value. The `null` value can be of any data type. {{% note %}} -To be implemented: [IMPL#300](https://github.com/influxdata/platform/issues/300) Design how nulls behave +[IMPL#723](https://github.com/influxdata/platform/issues/723) Design how nulls behave {{% /note %}} + +## Transformations +Transformations define a change to a stream. +Transformations may consume an input stream and always produce a new output stream. +The output stream group keys have a stable output order based on the input stream. +Specific ordering may change between releases, but is not considered a breaking change. + +Most transformations output one table for every table they receive from the input stream. +Transformations that modify group keys or values regroup the tables in the output stream. +A transformation produces side effects when constructed from a function that produces side effects. + +Transformations are represented using function types. diff --git a/content/v2.0/reference/flux/language/lexical-elements.md b/content/v2.0/reference/flux/language/lexical-elements.md index f2cb39294..ee588967b 100644 --- a/content/v2.0/reference/flux/language/lexical-elements.md +++ b/content/v2.0/reference/flux/language/lexical-elements.md @@ -65,7 +65,7 @@ empty in or package builtin ``` {{% note %}} -To be implemented: [IMPL#256](https://github.com/influxdata/platform/issues/256) Add in and empty operator support. +[IMPL#256](https://github.com/influxdata/platform/issues/256) Add in and empty operator support. {{% /note %}} @@ -93,7 +93,7 @@ The following coercion rules apply to numeric literals: * An error will occur if the coerced type cannot represent the literal value. {{% note %}} -To be implemented: [IMPL#255](https://github.com/influxdata/platform/issues/255) Allow numeric literal coercion. +[IMPL#255](https://github.com/influxdata/platform/issues/255) Allow numeric literal coercion. {{% /note %}} ### Integer literals @@ -138,7 +138,7 @@ decimals = decimal_digit { decimal_digit } . ``` {{% note %}} -To be implemented: [IMPL#254](https://github.com/influxdata/platform/issues/254) Parse float literals. +[IMPL#254](https://github.com/influxdata/platform/issues/254) Parse float literals. {{% /note %}} ### Duration literals @@ -217,7 +217,7 @@ When months are added to a date times and the resulting date is past the end of ``` {{% note %}} -To be implemented: [IMPL#657](https://github.com/influxdata/platform/issues/657) Implement Duration vectors. +[IMPL#657](https://github.com/influxdata/platform/issues/657) Implement Duration vectors. {{% /note %}} ## Date and time literals @@ -254,7 +254,7 @@ time_offset = "Z" | ("+" | "-" ) hour ":" minute . ``` {{% note %}} -To be implemented: [IMPL#152](https://github.com/influxdata/flux/issues/152) Implement shorthand time literals. +[IMPL#152](https://github.com/influxdata/flux/issues/152) Implement shorthand time literals. {{% /note %}} ### String literals @@ -287,7 +287,7 @@ StringExpression = "{" Expression "}" . {{% note %}} To be added: TODO: With string interpolation `string_lit` is not longer a lexical token as part of a literal, but an entire expression in and of itself. -To be implemented: [IMPL#252](https://github.com/influxdata/platform/issues/252) Parse string literals. +[IMPL#252](https://github.com/influxdata/platform/issues/252) Parse string literals. {{% /note %}} ##### Examples of string literals @@ -309,7 +309,7 @@ A function `printf` exists to allow more precise control over formatting of vari To include the literal curly brackets within a string they must be escaped. {{% note %}} -To be implemented: [IMPL#248](https://github.com/influxdata/platform/issues/248) Add printf function. +[IMPL#248](https://github.com/influxdata/platform/issues/248) Add printf function. {{% /note %}} ##### Example: Interpolation @@ -323,7 +323,7 @@ n = 42 ``` {{% note %}} -To be implemented: [IMPL#251](https://github.com/influxdata/platform/issues/251) Add string interpolation support +[IMPL#251](https://github.com/influxdata/platform/issues/251) Add string interpolation support {{% /note %}} ### Regular expression literals diff --git a/content/v2.0/reference/flux/language/options.md b/content/v2.0/reference/flux/language/options.md index da1a950b8..018cd2173 100644 --- a/content/v2.0/reference/flux/language/options.md +++ b/content/v2.0/reference/flux/language/options.md @@ -58,5 +58,5 @@ option location = loadLocation(name:"America/Denver") // Set location to be Amer ``` {{% note %}} -To be implemented: [IMPL#660](https://github.com/influxdata/platform/issues/660) Implement Location option +[IMPL#660](https://github.com/influxdata/platform/issues/660) Implement Location option {{% /note %}} diff --git a/content/v2.0/reference/flux/language/packages.md b/content/v2.0/reference/flux/language/packages.md index 73c7c9721..ce7d0f459 100644 --- a/content/v2.0/reference/flux/language/packages.md +++ b/content/v2.0/reference/flux/language/packages.md @@ -42,7 +42,7 @@ When a file does not declare a package clause, all identifiers in that file will belong to the special `main` package. {{% note %}} -To be implemented: [IMPL#247](https://github.com/influxdata/platform/issues/247) Add package/namespace support. +[IMPL#247](https://github.com/influxdata/platform/issues/247) Add package/namespace support. {{% /note %}} ### Package main diff --git a/content/v2.0/reference/flux/language/types.md b/content/v2.0/reference/flux/language/types.md index 5b906d746..eab5b72ae 100644 --- a/content/v2.0/reference/flux/language/types.md +++ b/content/v2.0/reference/flux/language/types.md @@ -19,7 +19,7 @@ Types are never explicitly declared as part of the syntax. Types are always inferred from the usage of the value. {{% note %}} -To be implemented: [IMPL#249](https://github.com/influxdata/platform/issues/249) Specify type inference rules. +[IMPL#249](https://github.com/influxdata/platform/issues/249) Specify type inference rules. {{% /note %}} ## Boolean types @@ -89,7 +89,7 @@ The value may be any other type, and need not be the same as other values within A _function type_ represents a set of all functions with the same argument and result types. {{% note %}} -To be implemented: [IMPL#249](https://github.com/influxdata/platform/issues/249) Specify type inference rules. +[IMPL#249](https://github.com/influxdata/platform/issues/249) Specify type inference rules. {{% /note %}} ## Generator types @@ -98,5 +98,5 @@ A _generator type_ represents a value that produces an unknown number of other v The generated values may be of any other type, but must all be the same type. {{% note %}} -To be implemented: [IMPL#658](https://github.com/influxdata/platform/query/issues/658) Implement Generators types. +[IMPL#658](https://github.com/influxdata/platform/query/issues/658) Implement Generators types. {{% /note %}} From e2995808160a82f8dd6eecce8260da8b21732e31 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 15 Mar 2019 17:38:39 -0600 Subject: [PATCH 11/13] Revert "Flux math package and functions" --- .../v2.0/reference/flux/functions/_index.md | 10 ++-- .../reference/flux/functions/all-functions.md | 2 +- .../flux/functions/built-in/_index.md | 8 +-- .../flux/functions/influxdb-v1/_index.md | 14 ++--- .../reference/flux/functions/math/_index.md | 46 --------------- .../v2.0/reference/flux/functions/math/abs.md | 34 ----------- .../reference/flux/functions/math/acos.md | 35 ----------- .../reference/flux/functions/math/acosh.md | 36 ------------ .../reference/flux/functions/math/asin.md | 37 ------------ .../reference/flux/functions/math/asinh.md | 35 ----------- .../reference/flux/functions/math/atan.md | 34 ----------- .../reference/flux/functions/math/atan2.md | 57 ------------------ .../reference/flux/functions/math/atanh.md | 40 ------------- .../reference/flux/functions/math/cbrt.md | 35 ----------- .../reference/flux/functions/math/ceil.md | 35 ----------- .../reference/flux/functions/math/copysign.md | 33 ----------- .../v2.0/reference/flux/functions/math/cos.md | 34 ----------- .../reference/flux/functions/math/cosh.md | 35 ----------- .../v2.0/reference/flux/functions/math/dim.md | 41 ------------- .../v2.0/reference/flux/functions/math/erf.md | 35 ----------- .../reference/flux/functions/math/erfc.md | 35 ----------- .../reference/flux/functions/math/erfcinv.md | 39 ------------- .../reference/flux/functions/math/erfinv.md | 39 ------------- .../v2.0/reference/flux/functions/math/exp.md | 36 ------------ .../reference/flux/functions/math/exp2.md | 36 ------------ .../reference/flux/functions/math/expm1.md | 40 ------------- .../flux/functions/math/float64bits.md | 28 --------- .../reference/flux/functions/math/floor.md | 35 ----------- .../reference/flux/functions/math/frexp.md | 40 ------------- .../reference/flux/functions/math/gamma.md | 38 ------------ .../reference/flux/functions/math/hypot.md | 44 -------------- .../reference/flux/functions/math/ilogb.md | 35 ----------- .../reference/flux/functions/math/isinf.md | 37 ------------ .../reference/flux/functions/math/isnan.md | 33 ----------- .../v2.0/reference/flux/functions/math/j0.md | 35 ----------- .../v2.0/reference/flux/functions/math/j1.md | 34 ----------- .../v2.0/reference/flux/functions/math/jn.md | 39 ------------- .../reference/flux/functions/math/ldexp.md | 41 ------------- .../reference/flux/functions/math/lgamma.md | 37 ------------ .../v2.0/reference/flux/functions/math/log.md | 36 ------------ .../reference/flux/functions/math/log10.md | 36 ------------ .../reference/flux/functions/math/log1p.md | 40 ------------- .../reference/flux/functions/math/log2.md | 36 ------------ .../reference/flux/functions/math/logb.md | 35 ----------- .../reference/flux/functions/math/m_inf.md | 30 ---------- .../reference/flux/functions/math/m_max.md | 44 -------------- .../reference/flux/functions/math/m_min.md | 43 -------------- .../v2.0/reference/flux/functions/math/mod.md | 45 -------------- .../reference/flux/functions/math/modf.md | 37 ------------ .../v2.0/reference/flux/functions/math/nan.md | 19 ------ .../flux/functions/math/nextafter.md | 40 ------------- .../v2.0/reference/flux/functions/math/pow.md | 58 ------------------- .../reference/flux/functions/math/pow10.md | 34 ----------- .../flux/functions/math/remainder.md | 42 -------------- .../reference/flux/functions/math/round.md | 35 ----------- .../flux/functions/math/roundtoeven.md | 37 ------------ .../reference/flux/functions/math/signbit.md | 28 --------- .../v2.0/reference/flux/functions/math/sin.md | 35 ----------- .../reference/flux/functions/math/sincos.md | 35 ----------- .../reference/flux/functions/math/sinh.md | 35 ----------- .../reference/flux/functions/math/sqrt.md | 36 ------------ .../v2.0/reference/flux/functions/math/tan.md | 35 ----------- .../reference/flux/functions/math/tanh.md | 35 ----------- .../reference/flux/functions/math/trunc.md | 35 ----------- .../v2.0/reference/flux/functions/math/y0.md | 36 ------------ .../v2.0/reference/flux/functions/math/y1.md | 36 ------------ .../v2.0/reference/flux/functions/math/yn.md | 42 -------------- .../flux/functions/strings/_index.md | 16 ++--- .../flux/functions/testing/_index.md | 14 ++--- 69 files changed, 32 insertions(+), 2370 deletions(-) delete mode 100644 content/v2.0/reference/flux/functions/math/_index.md delete mode 100644 content/v2.0/reference/flux/functions/math/abs.md delete mode 100644 content/v2.0/reference/flux/functions/math/acos.md delete mode 100644 content/v2.0/reference/flux/functions/math/acosh.md delete mode 100644 content/v2.0/reference/flux/functions/math/asin.md delete mode 100644 content/v2.0/reference/flux/functions/math/asinh.md delete mode 100644 content/v2.0/reference/flux/functions/math/atan.md delete mode 100644 content/v2.0/reference/flux/functions/math/atan2.md delete mode 100644 content/v2.0/reference/flux/functions/math/atanh.md delete mode 100644 content/v2.0/reference/flux/functions/math/cbrt.md delete mode 100644 content/v2.0/reference/flux/functions/math/ceil.md delete mode 100644 content/v2.0/reference/flux/functions/math/copysign.md delete mode 100644 content/v2.0/reference/flux/functions/math/cos.md delete mode 100644 content/v2.0/reference/flux/functions/math/cosh.md delete mode 100644 content/v2.0/reference/flux/functions/math/dim.md delete mode 100644 content/v2.0/reference/flux/functions/math/erf.md delete mode 100644 content/v2.0/reference/flux/functions/math/erfc.md delete mode 100644 content/v2.0/reference/flux/functions/math/erfcinv.md delete mode 100644 content/v2.0/reference/flux/functions/math/erfinv.md delete mode 100644 content/v2.0/reference/flux/functions/math/exp.md delete mode 100644 content/v2.0/reference/flux/functions/math/exp2.md delete mode 100644 content/v2.0/reference/flux/functions/math/expm1.md delete mode 100644 content/v2.0/reference/flux/functions/math/float64bits.md delete mode 100644 content/v2.0/reference/flux/functions/math/floor.md delete mode 100644 content/v2.0/reference/flux/functions/math/frexp.md delete mode 100644 content/v2.0/reference/flux/functions/math/gamma.md delete mode 100644 content/v2.0/reference/flux/functions/math/hypot.md delete mode 100644 content/v2.0/reference/flux/functions/math/ilogb.md delete mode 100644 content/v2.0/reference/flux/functions/math/isinf.md delete mode 100644 content/v2.0/reference/flux/functions/math/isnan.md delete mode 100644 content/v2.0/reference/flux/functions/math/j0.md delete mode 100644 content/v2.0/reference/flux/functions/math/j1.md delete mode 100644 content/v2.0/reference/flux/functions/math/jn.md delete mode 100644 content/v2.0/reference/flux/functions/math/ldexp.md delete mode 100644 content/v2.0/reference/flux/functions/math/lgamma.md delete mode 100644 content/v2.0/reference/flux/functions/math/log.md delete mode 100644 content/v2.0/reference/flux/functions/math/log10.md delete mode 100644 content/v2.0/reference/flux/functions/math/log1p.md delete mode 100644 content/v2.0/reference/flux/functions/math/log2.md delete mode 100644 content/v2.0/reference/flux/functions/math/logb.md delete mode 100644 content/v2.0/reference/flux/functions/math/m_inf.md delete mode 100644 content/v2.0/reference/flux/functions/math/m_max.md delete mode 100644 content/v2.0/reference/flux/functions/math/m_min.md delete mode 100644 content/v2.0/reference/flux/functions/math/mod.md delete mode 100644 content/v2.0/reference/flux/functions/math/modf.md delete mode 100644 content/v2.0/reference/flux/functions/math/nan.md delete mode 100644 content/v2.0/reference/flux/functions/math/nextafter.md delete mode 100644 content/v2.0/reference/flux/functions/math/pow.md delete mode 100644 content/v2.0/reference/flux/functions/math/pow10.md delete mode 100644 content/v2.0/reference/flux/functions/math/remainder.md delete mode 100644 content/v2.0/reference/flux/functions/math/round.md delete mode 100644 content/v2.0/reference/flux/functions/math/roundtoeven.md delete mode 100644 content/v2.0/reference/flux/functions/math/signbit.md delete mode 100644 content/v2.0/reference/flux/functions/math/sin.md delete mode 100644 content/v2.0/reference/flux/functions/math/sincos.md delete mode 100644 content/v2.0/reference/flux/functions/math/sinh.md delete mode 100644 content/v2.0/reference/flux/functions/math/sqrt.md delete mode 100644 content/v2.0/reference/flux/functions/math/tan.md delete mode 100644 content/v2.0/reference/flux/functions/math/tanh.md delete mode 100644 content/v2.0/reference/flux/functions/math/trunc.md delete mode 100644 content/v2.0/reference/flux/functions/math/y0.md delete mode 100644 content/v2.0/reference/flux/functions/math/y1.md delete mode 100644 content/v2.0/reference/flux/functions/math/yn.md diff --git a/content/v2.0/reference/flux/functions/_index.md b/content/v2.0/reference/flux/functions/_index.md index 4fabb901e..73360194a 100644 --- a/content/v2.0/reference/flux/functions/_index.md +++ b/content/v2.0/reference/flux/functions/_index.md @@ -1,15 +1,15 @@ --- -title: Flux packages and functions -description: Flux packages and functions allows you to retrieve, transform, process, and output data easily. -v2.0/tags: [flux, functions, package] +title: Flux functions +description: Flux functions allows you to retrieve, transform, process, and output data easily. +v2.0/tags: [flux, functions] menu: v2_0_ref: - name: Flux packages and functions + name: Flux functions parent: Flux query language weight: 101 --- Flux's functional syntax allows you to retrieve, transform, process, and output data easily. -There is a large library of built-in functions and importable packages: +There is a large library of built-in and importable functions: {{< children >}} diff --git a/content/v2.0/reference/flux/functions/all-functions.md b/content/v2.0/reference/flux/functions/all-functions.md index f0a0f821a..804cd2385 100644 --- a/content/v2.0/reference/flux/functions/all-functions.md +++ b/content/v2.0/reference/flux/functions/all-functions.md @@ -4,7 +4,7 @@ description: View the full library of documented Flux functions. menu: v2_0_ref: name: View all functions - parent: Flux packages and functions + parent: Flux functions weight: 299 --- diff --git a/content/v2.0/reference/flux/functions/built-in/_index.md b/content/v2.0/reference/flux/functions/built-in/_index.md index 0b60a1afa..eec9bdc4e 100644 --- a/content/v2.0/reference/flux/functions/built-in/_index.md +++ b/content/v2.0/reference/flux/functions/built-in/_index.md @@ -1,17 +1,17 @@ --- title: Flux built-in functions description: > - Built-in functions provide a foundation for working with data using Flux. + Built-in functions provide a necessary foundation for working with data using Flux. They do not require an import statement and are usable without any extra setup. menu: v2_0_ref: name: Built-in - parent: Flux packages and functions + parent: Flux functions weight: 201 -v2.0/tags: [built-in, functions, package] +v2.0/tags: [built-in, functions] --- -Built-in functions provide a foundation for working with data using Flux. +Built-in functions provide a necessary foundation for working with data using Flux. Because these functions are "built-in," they do not require an `import` statement and are usable without any extra setup. Built-in functions are grouped into the following categories: diff --git a/content/v2.0/reference/flux/functions/influxdb-v1/_index.md b/content/v2.0/reference/flux/functions/influxdb-v1/_index.md index 6a3a54767..e5a2ea5e6 100644 --- a/content/v2.0/reference/flux/functions/influxdb-v1/_index.md +++ b/content/v2.0/reference/flux/functions/influxdb-v1/_index.md @@ -1,20 +1,20 @@ --- -title: Flux InfluxDB v1 package +title: Flux InfluxDB v1 functions description: > - The Flux InfluxDB v1 package provides functions for managing data from an InfluxDB v1.x + InfluxDB v1 Flux functions provide tools for managing data from an InfluxDB v1.x database or structured using the InfluxDB v1 data structure. - Import the `influxdata/influxdb/v1` package. + To use them, import the `influxdata/influxdb/v1` package. menu: v2_0_ref: name: InfluxDB v1 - parent: Flux packages and functions -weight: 203 -v2.0/tags: [functions, influxdb-v1, package] + parent: Flux functions +weight: 202 +v2.0/tags: [functions, influxdb-v1] --- InfluxDB v1 Flux functions provide tools for managing data from an InfluxDB v1.x database or structured using the InfluxDB v1 data structure. -Import the `influxdata/influxdb/v1` package: +To use them, import the `influxdata/influxdb/v1` package: ```js import "influxdata/influxdb/v1" diff --git a/content/v2.0/reference/flux/functions/math/_index.md b/content/v2.0/reference/flux/functions/math/_index.md deleted file mode 100644 index be2529183..000000000 --- a/content/v2.0/reference/flux/functions/math/_index.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: Flux math package -description: > - The Flux math package provides basic constants and mathematical functions. - Import the `math` package. -menu: - v2_0_ref: - name: Math - parent: Flux packages and functions -weight: 202 -v2.0/tags: [math, functions] ---- - -The Flux math package provides basic constants and mathematical functions. -Import the `math` package. - -```js -import "math" -``` - -## Mathematical constants -That `math` package includes the following mathematical constants. - -```js -math.e = 2.71828182845904523536028747135266249775724709369995957496696763 // https ://oeis.org/A001113 -math.pi = 3.14159265358979323846264338327950288419716939937510582097494459 // https ://oeis.org/A000796 -math.phi = 1.61803398874989484820458683436563811772030917980576286213544862 // https ://oeis.org/A001622 - -math.sqrt2 = 1.41421356237309504880168872420969807856967187537694807317667974 // https ://oeis.org/A002193 -math.sqrte = 1.64872127070012814684865078781416357165377610071014801157507931 // https ://oeis.org/A019774 -math.sqrtpi = 1.77245385090551602729816748334114518279754945612238712821380779 // https ://oeis.org/A002161 -math.sqrtphi = 1.27201964951406896425242246173749149171560804184009624861664038 // https ://oeis.org/A139339 - -math.ln2 = 0.693147180559945309417232121458176568075500134360255254120680009 // https://oeis.org/A002162 -math.log2e = 1 ÷ math.ln2 -math.ln10 = 2.30258509299404568401799145468436420760110148862877297603332790 // https ://oeis.org/A002392 -math.log10e = 1 ÷ math.ln10 - -math.maxfloat = 1.797693134862315708145274237317043567981e+308 // 2**1023 * (2**53 - 1) / 2**52 -math.maxint = 1<<63 - 1 -math.minint = -1 << 63 -math.maxuint = 1<<64 - 1 -``` - -## Mathematical functions -{{< children type="functions" show="pages" >}} diff --git a/content/v2.0/reference/flux/functions/math/abs.md b/content/v2.0/reference/flux/functions/math/abs.md deleted file mode 100644 index 8db0c56b7..000000000 --- a/content/v2.0/reference/flux/functions/math/abs.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: math.abs() function -description: The math.abs() function returns the absolute value of `x`. -menu: - v2_0_ref: - name: math.abs - parent: Math -weight: 301 ---- - -The `math.abs()` function returns the absolute value of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.abs(x: -1.22) - -// Returns 1.22 -``` - -## Parameters - -### x -The value used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.abs(x: ±Inf) // Returns +Inf -math.abs(x: NaN) // Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/acos.md b/content/v2.0/reference/flux/functions/math/acos.md deleted file mode 100644 index 5b6b88fd8..000000000 --- a/content/v2.0/reference/flux/functions/math/acos.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.acos() function -description: The math.acos() function returns the arccosine of `x` in radians. -menu: - v2_0_ref: - name: math.acos - parent: Math -weight: 301 ---- - -The `math.acos()` function returns the arccosine of `x` in radians. - -_**Output data type:** Float_ - -```js -import "math" - -math.acos(x: 0.22) - -// Returns 1.3489818562981022 -``` - -## Parameters - -### x -`x` should be greater than -1 and less than 1. -Otherwise, the operation will return `NaN`. - -_**Data type:** Float_ - -## Special cases -```js -math.acos(x: <-1) // Returns NaN -math.acos(x: >1) // Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/acosh.md b/content/v2.0/reference/flux/functions/math/acosh.md deleted file mode 100644 index 95cead337..000000000 --- a/content/v2.0/reference/flux/functions/math/acosh.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: math.acosh() function -description: The math.acosh() function returns the inverse hyperbolic cosine of `x`. -menu: - v2_0_ref: - name: math.acosh - parent: Math -weight: 301 ---- - -The `math.acosh()` function returns the inverse hyperbolic cosine of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.acosh(x: 1.22) - -// Returns 0.6517292837263385 -``` - -## Parameters - -### x -`x` should be greater than 1. -If less than 1, the operation will return `NaN`. - -_**Data type:** Float_ - -## Special cases -```js -math.acosh(x: +Inf) // Returns +Inf -math.acosh(x: <1) // Returns NaN -math.acosh(x: NaN) // Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/asin.md b/content/v2.0/reference/flux/functions/math/asin.md deleted file mode 100644 index 614e12174..000000000 --- a/content/v2.0/reference/flux/functions/math/asin.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: math.asin() function -description: The math.asin() function returns the arcsine of `x` in radians. -menu: - v2_0_ref: - name: math.asin - parent: Math -weight: 301 ---- - -The `math.asin()` function returns the arcsine of `x` in radians. - -_**Output data type:** Float_ - -```js -import "math" - -math.asin(x: 0.22) - -// Returns 0.22181447049679442 -``` - -## Parameters - -### x -The value used in the operation. -`x` should be greater than -1 and less than 1. -Otherwise, the function will return `NaN`. - -_**Data type:** Float_ - -## Special cases -```js -math.asin(x: ±0) // Returns ±0 -math.asin(x: <-1) // Returns NaN -math.asin(x: >1) // Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/asinh.md b/content/v2.0/reference/flux/functions/math/asinh.md deleted file mode 100644 index 9800d3ad0..000000000 --- a/content/v2.0/reference/flux/functions/math/asinh.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.asinh() function -description: The math.asinh() function returns the inverse hyperbolic sine of `x`. -menu: - v2_0_ref: - name: math.asinh - parent: Math -weight: 301 ---- - -The `math.asinh()` function returns the inverse hyperbolic sine of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.asinh(x: 3.14) - -// Returns 1.8618125572133835 -``` - -## Parameters - -### x -The value used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.asinh(x: ±0) // Returns ±0 -math.asinh(x: ±Inf) // Returns ±Inf -math.asinh(x: NaN) // Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/atan.md b/content/v2.0/reference/flux/functions/math/atan.md deleted file mode 100644 index 524a3fe96..000000000 --- a/content/v2.0/reference/flux/functions/math/atan.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: math.atan() function -description: The math.atan() function returns the arctangent of `x` in radians. -menu: - v2_0_ref: - name: math.atan - parent: Math -weight: 301 ---- - -The `math.atan()` function returns the arctangent of `x` in radians. - -_**Output data type:** Float_ - -```js -import "math" - -math.atan(x: 3.14) - -// Returns 1.262480664599468 -``` - -## Parameters - -### x -The value used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.atan(x: ±0) // Returns ±0 -math.atan(x: ±Inf) // Returns ±Pi/2 -``` diff --git a/content/v2.0/reference/flux/functions/math/atan2.md b/content/v2.0/reference/flux/functions/math/atan2.md deleted file mode 100644 index 1556dcbf5..000000000 --- a/content/v2.0/reference/flux/functions/math/atan2.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: math.atan2() function -description: > - The math.atan2() function returns the arc tangent of `y`/`x`, using the signs of - the parameters to determine the quadrant of the return value. -menu: - v2_0_ref: - name: math.atan2 - parent: Math -weight: 301 ---- - -The `math.atan2()` function returns the arc tangent of `y`/`x`, using the signs -of the two to determine the quadrant of the return value. - -_**Output data type:** Float_ - -```js -import "math" - -math.atan2(y: 1.22, x: 3.14) - -// Returns 0.3705838802763881 -``` - -## Parameters - -### y -The y coordinate used in the operation. - -_**Data type:** Float_ - -### x -The x coordinate used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.atan2(y:y, x:NaN) // Returns NaN -math.atan2(y: NaN, x:x) // Returns NaN -math.atan2(y: +0, x: >=0) // Returns +0 -math.atan2(y: -0, x: >=0) // Returns -0 -math.atan2(y: +0, x: <=-0) // Returns +Pi -math.atan2(y: -0, x: <=-0) // Returns -Pi -math.atan2(y: >0, x: 0) // Returns +Pi/2 -math.atan2(y: <0, x: 0) // Returns -Pi/2 -math.atan2(y: +Inf, x: +Inf) // Returns +Pi/4 -math.atan2(y: -Inf, x: +Inf) // Returns -Pi/4 -math.atan2(y: +Inf, x: -Inf) // Returns 3Pi/4 -math.atan2(y: -Inf, x: -Inf) // Returns -3Pi/4 -math.atan2(y:y, x: +Inf) // Returns 0 -math.atan2(y: >0, x: -Inf) // Returns +Pi -math.atan2(y: <0, x: -Inf) // Returns -Pi -math.atan2(y: +Inf, x:x) // Returns +Pi/2 -math.atan2(y: -Inf, x:x) // Returns -Pi/2 -``` diff --git a/content/v2.0/reference/flux/functions/math/atanh.md b/content/v2.0/reference/flux/functions/math/atanh.md deleted file mode 100644 index d3a551543..000000000 --- a/content/v2.0/reference/flux/functions/math/atanh.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: math.atanh() function -description: The math.atanh() function returns the inverse hyperbolic tangent of `x`. -menu: - v2_0_ref: - name: math.atanh - parent: Math -weight: 301 ---- - -The `math.atanh()` function returns the inverse hyperbolic tangent of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.atanh(x: 0.22) - -// Returns 0.22365610902183242 -``` - -## Parameters - -### x -The value used in the operation. -`x` should be greater than -1 and less than 1. -Otherwise, the operation will return `NaN`. - -_**Data type:** Float_ - -## Special cases -```js -math.atanh(x: 1) // Returns +Inf -math.atanh(x: ±0) // Returns ±0 -math.atanh(x: -1) // Returns -Inf -math.atanh(x: <-1) // Returns NaN -math.atanh(x: >1) // Returns NaN -math.atanh(x: NaN) // Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/cbrt.md b/content/v2.0/reference/flux/functions/math/cbrt.md deleted file mode 100644 index 6054dacf3..000000000 --- a/content/v2.0/reference/flux/functions/math/cbrt.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.cbrt() function -description: The math.cbrt() function returns the cube root of `x`. -menu: - v2_0_ref: - name: math.cbrt - parent: Math -weight: 301 ---- - -The `math.cbrt()` function returns the cube root of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.cbrt(x: 1728.0) - -// Returns 12.0 -``` - -## Parameters - -### x -The value used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.cbrt(±0) // Returns ±0 -math.cbrt(±Inf) // Returns ±Inf -math.cbrt(NaN) // Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/ceil.md b/content/v2.0/reference/flux/functions/math/ceil.md deleted file mode 100644 index 091ffbedb..000000000 --- a/content/v2.0/reference/flux/functions/math/ceil.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.ceil() function -description: The math.ceil() function returns the least integer value greater than or equal to `x`. -menu: - v2_0_ref: - name: math.ceil - parent: Math -weight: 301 ---- - -The `math.ceil()` function returns the least integer value greater than or equal to `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.ceil(x: 3.14) - -// Returns 4.0 -``` - -## Parameters - -### x -The value used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.ceil(±0) // Returns ±0 -math.ceil(±Inf) // Returns ±Inf -math.ceil(NaN) // Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/copysign.md b/content/v2.0/reference/flux/functions/math/copysign.md deleted file mode 100644 index 26466573f..000000000 --- a/content/v2.0/reference/flux/functions/math/copysign.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: math.copysign() function -description: The math.copysign() function returns a value with the magnitude of `x` and the sign of `y`. -menu: - v2_0_ref: - name: math.copysign - parent: Math -weight: 301 ---- - -The `math.copysign()` function returns a value with the magnitude of `x` and the sign of `y`. - -_**Output data type:** Float_ - -```js -import "math" - -math.copysign(x: 1.0, y: 2.0) - -// Returns 1.0 -``` - -## Parameters - -### x -The magnitude used in the operation. - -_**Data type:** Float_ - -### y -The sign used in the operation. - -_**Data type:** Float_ diff --git a/content/v2.0/reference/flux/functions/math/cos.md b/content/v2.0/reference/flux/functions/math/cos.md deleted file mode 100644 index 7c1b6bd2f..000000000 --- a/content/v2.0/reference/flux/functions/math/cos.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: math.cos() function -description: The math.cos() function returns the cosine of the radian argument `x`. -menu: - v2_0_ref: - name: math.cos - parent: Math -weight: 301 ---- - -The `math.cos()` function returns the cosine of the radian argument `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.cos(x: 3.14) - -// Returns -0.9999987317275396 -``` - -## Parameters - -### x -The value used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.cos(±Inf) // Returns NaN -math.cos(NaN) // Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/cosh.md b/content/v2.0/reference/flux/functions/math/cosh.md deleted file mode 100644 index 22fff8771..000000000 --- a/content/v2.0/reference/flux/functions/math/cosh.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.cosh() function -description: The math.cosh() function returns the hyperbolic cosine of `x`. -menu: - v2_0_ref: - name: math.cosh - parent: Math -weight: 301 ---- - -The `math.cosh()` function returns the hyperbolic cosine of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.cosh(x: 1.22) - -// Returns 1.8412089502726743 -``` - -## Parameters - -### x -The value used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.cosh(±0) // Returns 1 -math.cosh(±Inf) // Returns +Inf -math.cosh(NaN) // Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/dim.md b/content/v2.0/reference/flux/functions/math/dim.md deleted file mode 100644 index b52a3c8b2..000000000 --- a/content/v2.0/reference/flux/functions/math/dim.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: math.dim() function -description: The math.dim() function returns the maximum of `x`-`y` or 0. -menu: - v2_0_ref: - name: math.dim - parent: Math -weight: 301 ---- - -The `math.dim()` function returns the maximum of `x - y` or 0. - -_**Output data type:** Float_ - -```js -import "math" - -math.dim(x: 12.2, y: 8.1) - -// Returns 4.1 -``` - -## Parameters - -### x -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.dim(x: +Inf, y: +Inf) // Returns NaN -math.dim(x: -Inf, y: -Inf) // Returns NaN -math.dim(x:x, y : NaN) // Returns NaN -math.dim(x: NaN, y :y) // Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/erf.md b/content/v2.0/reference/flux/functions/math/erf.md deleted file mode 100644 index ebc8cca16..000000000 --- a/content/v2.0/reference/flux/functions/math/erf.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.erf() function -description: The math.erf() function returns the error function of `x`. -menu: - v2_0_ref: - name: math.erf - parent: Math -weight: 301 ---- - -The `math.erf()` function returns the error function of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.erf(x: 22.6) - -// Returns 1.0 -``` - -## Parameters - -### x -The value used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.erf(+Inf) // Returns 1 -math.erf(-Inf) // Returns -1 -math.erf(NaN) // Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/erfc.md b/content/v2.0/reference/flux/functions/math/erfc.md deleted file mode 100644 index a2a7e2ac5..000000000 --- a/content/v2.0/reference/flux/functions/math/erfc.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.erfc() function -description: The math.erfc() function returns the complementary error function of `x`. -menu: - v2_0_ref: - name: math.erfc - parent: Math -weight: 301 ---- - -The `math.erfc()` function returns the complementary error function of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.erfc(x: 22.6) - -// Returns 3.7726189138490583e-224 -``` - -## Parameters - -### x -The value used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.erfc(+Inf) // Returns 0 -math.erfc(-Inf) // Returns 2 -math.erfc(NaN) // Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/erfcinv.md b/content/v2.0/reference/flux/functions/math/erfcinv.md deleted file mode 100644 index c5f2c473f..000000000 --- a/content/v2.0/reference/flux/functions/math/erfcinv.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: math.erfcinv() function -description: The math.erfcinv() function returns the inverse of `math.erfc()`. -menu: - v2_0_ref: - name: math.erfcinv - parent: Math -weight: 301 ---- - -The `math.erfcinv()` function returns the inverse of `math.erfc()`. - -_**Output data type:** Float_ - -```js -import "math" - -math.erfcinv(x: 0.42345) - -// Returns 0.5660037715858239 -``` - -## Parameters - -### x -The value used in the operation. -`x` should be greater than 0 and less than 2. -Otherwise, the operation will return `NaN`. - -_**Data type:** Float_ - -## Special cases -```js -math.erfcinv(x: 0) // Returns +Inf -math.erfcinv(x: 2) // Returns -Inf -math.erfcinv(x: <0) // Returns NaN -math.erfcinv(x: >2) // Returns NaN -math.erfcinv(x: NaN) // Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/erfinv.md b/content/v2.0/reference/flux/functions/math/erfinv.md deleted file mode 100644 index 2c4511397..000000000 --- a/content/v2.0/reference/flux/functions/math/erfinv.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: math.erfinv() function -description: The math.erfinv() function returns the inverse error function of `x`. -menu: - v2_0_ref: - name: math.erfinv - parent: Math -weight: 301 ---- - -The `math.erfinv()` function returns the inverse error function of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.erfinv(x: 0.22) - -// Returns 0.19750838337227364 -``` - -## Parameters - -### x -The value used in the operation. -`x` should be greater than -1 and less than 1. -Otherwise, the operation will return `NaN`. - -_**Data type:** Float_ - -## Special cases -```js -math.erfinv(x: 1) // Returns +Inf -math.erfinv(x: -1) // Returns -Inf -math.erfinv(x: <-1) // Returns NaN -math.erfinv(x: > 1) // Returns NaN -math.erfinv(x: NaN) // Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/exp.md b/content/v2.0/reference/flux/functions/math/exp.md deleted file mode 100644 index 14228533a..000000000 --- a/content/v2.0/reference/flux/functions/math/exp.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: math.exp() function -description: The math.exp() function returns `e**x`, the base-e exponential of `x`. -menu: - v2_0_ref: - name: math.exp - parent: Math -weight: 301 ---- - -The `math.exp()` function returns `e**x`, the base-e exponential of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.exp(x: 21.0) - -// Returns 1.3188157344832146e+09 -``` - -## Parameters - -### x -The value used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.exp(x: +Inf) // Returns +Inf -math.exp(x: NaN) // Returns NaN -``` - -Very large values overflow to 0 or +Inf. Very small values underflow to 1. diff --git a/content/v2.0/reference/flux/functions/math/exp2.md b/content/v2.0/reference/flux/functions/math/exp2.md deleted file mode 100644 index d66b572d0..000000000 --- a/content/v2.0/reference/flux/functions/math/exp2.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: math.exp2() function -description: The math.exp2() function returns `2**x`, the base-2 exponential of `x`. -menu: - v2_0_ref: - name: math.exp2 - parent: Math -weight: 301 ---- - -The `math.exp2()` function returns `2**x`, the base-2 exponential of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.exp2(x: 21.0) - -// Returns 2.097152e+06 -``` - -## Parameters - -### x -The value used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.exp2(x: +Inf) // Returns +Inf -math.exp2(x: NaN) // Returns NaN -``` - -Very large values overflow to 0 or +Inf. Very small values underflow to 1. diff --git a/content/v2.0/reference/flux/functions/math/expm1.md b/content/v2.0/reference/flux/functions/math/expm1.md deleted file mode 100644 index 953926420..000000000 --- a/content/v2.0/reference/flux/functions/math/expm1.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: math.expm1() function -description: > - The math.expm1() function returns `e**x - 1`, the base-e exponential of `x` minus 1. - It is more accurate than `math.exp(x:x) - 1` when `x` is near zero. -menu: - v2_0_ref: - name: math.expm1 - parent: Math -weight: 301 ---- - -The `math.expm1()` function returns `e**x - 1`, the base-e exponential of `x` minus 1. -It is more accurate than `math.exp(x:x) - 1` when `x` is near zero. - -_**Output data type:** Float_ - -```js -import "math" - -math.expm1(x: 1.22) - -// Returns 2.3871877336213343 -``` - -## Parameters - -### x -The value used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.expm1(+Inf) // Returns +Inf -math.expm1(-Inf) // Returns -1 -math.expm1(NaN) // Returns NaN -``` - -Very large values overflow to -1 or +Inf. diff --git a/content/v2.0/reference/flux/functions/math/float64bits.md b/content/v2.0/reference/flux/functions/math/float64bits.md deleted file mode 100644 index 95a16dcb9..000000000 --- a/content/v2.0/reference/flux/functions/math/float64bits.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: math.float64bits() function -description: 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. -menu: - v2_0_ref: - name: math.float64bits - parent: Math -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_ - -```js -import "math" - -math.float64bits(f: 1234.56) - -// Returns 4653144467747100426 -``` - -## Parameters - -### f -The value used in the operation. - -_**Data type:** Float_ diff --git a/content/v2.0/reference/flux/functions/math/floor.md b/content/v2.0/reference/flux/functions/math/floor.md deleted file mode 100644 index bea8631d9..000000000 --- a/content/v2.0/reference/flux/functions/math/floor.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.floor() function -description: The math.floor() function returns the greatest integer value less than or equal to `x`. -menu: - v2_0_ref: - name: math.floor - parent: Math -weight: 301 ---- - -The `math.floor()` function returns the greatest integer value less than or equal to `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.floor(x: 1.22) - -// Returns 1.0 -``` - -## Parameters - -### x -The value used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.floor(±0) // Returns ±0 -math.floor(±Inf) // Returns ±Inf -math.floor(NaN) // Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/frexp.md b/content/v2.0/reference/flux/functions/math/frexp.md deleted file mode 100644 index 622a1006c..000000000 --- a/content/v2.0/reference/flux/functions/math/frexp.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: math.frexp() function -description: > - The math.frexp() function breaks `f` into a normalized fraction and an integral power of two. - It returns `frac` and `exp` satisfying `f == frac × 2**exp`, with the absolute - value of `frac` in the interval [½, 1). -menu: - v2_0_ref: - name: math.frexp - parent: Math -weight: 301 ---- - -The `math.frexp()` function breaks `f` into a normalized fraction and an integral power of two. -It returns `frac` and `exp` satisfying `f == frac × 2**exp`, with the absolute value -of `frac` in the interval `[½, 1)`. - -_**Output data type:** Object_ - -```js -import "math" - -math.frexp(f: 22.0) - -// Returns {frac: 0.6875, exp: 5} -``` - -## Parameters - -### f -The value used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.frexp(f: ±0) // Returns {frac: ±0, exp: 0} -math.frexp(f: ±Inf) // Returns {frac: ±Inf, exp: 0} -math.frexp(f: NaN) // Returns {frac: NaN, exp: 0} -``` diff --git a/content/v2.0/reference/flux/functions/math/gamma.md b/content/v2.0/reference/flux/functions/math/gamma.md deleted file mode 100644 index 744d5cdc8..000000000 --- a/content/v2.0/reference/flux/functions/math/gamma.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: math.gamma() function -description: The math.gamma() function returns the Gamma function of `x`. -menu: - v2_0_ref: - name: math.gamma - parent: Math -weight: 301 ---- - -The `math.gamma()` function returns the Gamma function of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.gamma(x: 2.12) - -// Returns 1.056821007887572 -``` - -## Parameters - -### x -The value used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.gamma(x: +Inf) = +Inf -math.gamma(x: +0) = +Inf -math.gamma(x: -0) = -Inf -math.gamma(x: <0) = NaN for integer x < 0 -math.gamma(x: -Inf) = NaN -math.gamma(x: NaN) = NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/hypot.md b/content/v2.0/reference/flux/functions/math/hypot.md deleted file mode 100644 index c9d6af266..000000000 --- a/content/v2.0/reference/flux/functions/math/hypot.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: math.hypot() function -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 - parent: Math -weight: 301 ---- - -The `math.hypot()` function returns the square root of `p*p + q*q`, -taking care to avoid overflow and underflow. - -_**Output data type:** Float_ - -```js -import "math" - -math.hypot(p: 2.0, q: 5.0) - -// Returns 5.385164807134505 -``` - -## Parameters - -### 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 deleted file mode 100644 index 22b87b558..000000000 --- a/content/v2.0/reference/flux/functions/math/ilogb.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.ilogb() function -description: The math.ilogb() function returns the binary exponent of `x` as an integer. -menu: - v2_0_ref: - name: math.ilogb - parent: Math -weight: 301 ---- - -The `math.ilogb()` function returns the binary exponent of `x` as an integer. - -_**Output data type:** Integer_ - -```js -import "math" - -math.ilogb(x: 123.45) - -// Returns 6.0 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index 900dc54cf..000000000 --- a/content/v2.0/reference/flux/functions/math/isinf.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: math.isInf() function -description: The math.isInf() function reports whether `f` is an infinity, according to `sign`. -menu: - v2_0_ref: - name: math.isInf - parent: Math -weight: 301 ---- - -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(f: 2.12, sign: 3) - -// Returns false -``` - -## Parameters - -### f -The value used in the evaluation. - -_**Data type:** Float_ - -### 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 deleted file mode 100644 index dfcf73ae1..000000000 --- a/content/v2.0/reference/flux/functions/math/isnan.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: math.isNaN() function -description: The math.isNaN() function reports whether `f` is an IEEE 754 “not-a-number” value. -menu: - v2_0_ref: - name: math.isNaN - parent: Math -weight: 301 ---- - -The `math.isNaN()` function reports whether `f` is an IEEE 754 “not-a-number” value. - -_**Output data type:** Boolean_ - -```js -import "math" - -math.isNaN(f: 12.345) - -// Returns false -``` - -## Parameters - -### f -The value used in the evaluation. - -_**Data type:** Float_ - -## Special cases -```js - -``` diff --git a/content/v2.0/reference/flux/functions/math/j0.md b/content/v2.0/reference/flux/functions/math/j0.md deleted file mode 100644 index 74338fd03..000000000 --- a/content/v2.0/reference/flux/functions/math/j0.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.j0() function -description: The math.j0() function returns the order-zero Bessel function of the first kind. -menu: - v2_0_ref: - name: math.j0 - parent: Math -weight: 301 ---- - -The `math.j0()` function returns the order-zero Bessel function of the first kind. - -_**Output data type:** Float_ - -```js -import "math" - -math.j0(x: 1.23) - -// Returns 0.656070571706025 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index 594b3c81d..000000000 --- a/content/v2.0/reference/flux/functions/math/j1.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: math.j1() function -description: The math.j1() function returns the order-one Bessel function of the first kind. -menu: - v2_0_ref: - name: math.j1 - parent: Math -weight: 301 ---- - -The `math.j1()` function returns the order-one Bessel function of the first kind. - -_**Output data type:** Float_ - -```js -import "math" - -math.j1(x: 1.23) - -// Returns 0.5058005726280961 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index 80e0f6acf..000000000 --- a/content/v2.0/reference/flux/functions/math/jn.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: math.jn() function -description: The math.jn() function returns the order-n Bessel function of the first kind. -menu: - v2_0_ref: - name: math.jn - parent: Math -weight: 301 ---- - -The `math.jn()` function returns the order-n Bessel function of the first kind. - -_**Output data type:** Float_ - -```js -import "math" - -math.jn(n: 2, x: 1.23) - -// Returns 0.16636938378681407 -``` - -## Parameters - -### n -The order number. - -_**Data type:** Integer_ - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index 8ecfb26eb..000000000 --- a/content/v2.0/reference/flux/functions/math/ldexp.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: math.ldexp() function -description: The math.ldexp() function is the inverse of `math.frexp()`. It returns `frac × 2**exp`. -menu: - v2_0_ref: - name: math.ldexp - parent: Math -weight: 301 ---- - -The `math.ldexp()` function is the inverse of [`math.frexp()`](/v2.0/reference/flux/functions/math/frexp). -It returns `frac × 2**exp`. - -_**Output data type:** Float_ - -```js -import "math" - -math.ldexp(frac: 0.5, exp: 6) - -// Returns 32.0 -``` - -## Parameters - -### 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 deleted file mode 100644 index 2be3b19e5..000000000 --- a/content/v2.0/reference/flux/functions/math/lgamma.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: math.lgamma() function -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 - parent: Math -weight: 301 ---- - -The `math.lgamma()` function returns the natural logarithm and sign (-1 or +1) of `math.gamma(x:x)`. - -_**Output data format:** Object_ - -```js -import "math" - -math.lgamma(x: 3.14) - -// Returns {lgamma: 0.8261387047770286, sign: 1} -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index 84eb17fc8..000000000 --- a/content/v2.0/reference/flux/functions/math/log.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: math.log() function -description: The math.log() function returns the natural logarithm of `x`. -menu: - v2_0_ref: - name: math.log - parent: Math -weight: 301 ---- - -The `math.log()` function returns the natural logarithm of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.log(x: 3.14) - -// Returns 1.144222799920162 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index 1b3a7ed72..000000000 --- a/content/v2.0/reference/flux/functions/math/log10.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: math.log10() function -description: The math.log10() function returns the decimal logarithm of `x`. -menu: - v2_0_ref: - name: math.log10 - parent: Math -weight: 301 ---- - -The `math.log10()` function returns the decimal logarithm of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.log10(x: 3.14) - -// Returns 0.4969296480732149 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index 463ccc078..000000000 --- a/content/v2.0/reference/flux/functions/math/log1p.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: math.log1p() function -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 - parent: Math -weight: 301 ---- - -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. - -_**Output data type:** Float_ - -```js -import "math" - -math.log1p(x: 0.56) - -// Returns 0.44468582126144574 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index a44fd54f0..000000000 --- a/content/v2.0/reference/flux/functions/math/log2.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: math.log2() function -description: The math.log2() function returns the binary logarithm of `x`. -menu: - v2_0_ref: - name: math.log2 - parent: Math -weight: 301 ---- - -The `math.log2()` function returns the binary logarithm of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.log2(x: 3.14) - -// Returns 1.6507645591169022 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index cd5049a70..000000000 --- a/content/v2.0/reference/flux/functions/math/logb.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.logb() function -description: The math.logb() function returns the binary exponent of `x`. -menu: - v2_0_ref: - name: math.logb - parent: Math -weight: 301 ---- - -The `math.logb()` function returns the binary exponent of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.logb(x: 3.14) - -// Returns 1.0 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index da77b79ec..000000000 --- a/content/v2.0/reference/flux/functions/math/m_inf.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: math.m_inf() function -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 - parent: Math -weight: 301 ---- - -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(sign: 1) - -// Returns +Inf -``` - -## Parameters - -### sign -The sign value used in the operation. - -_**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 deleted file mode 100644 index 3dd4c422e..000000000 --- a/content/v2.0/reference/flux/functions/math/m_max.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: math.m_max() function -description: The math.m_max() function returns the larger of `x` or `y`. -menu: - v2_0_ref: - name: math.m_max - parent: Math -weight: 301 ---- - -The `math.m_max()` function returns the larger of `x` or `y`. - -_**Output data type:** Float_ - -```js -import "math" - -math.m_max(x: 1.23, y: 4.56) - -// Returns 4.56 -``` - -## Parameters - -### x -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 deleted file mode 100644 index 404982967..000000000 --- a/content/v2.0/reference/flux/functions/math/m_min.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: math.m_min() function -description: The math.m_min() function returns the smaller of `x` or `y`. -menu: - v2_0_ref: - name: math.m_min - parent: Math -weight: 301 ---- - -The `math.m_min()` function returns the smaller of `x` or `y`. - -_**Output data type:** Float_ - -```js -import "math" - -math.m_min(x: 1.23, y: 4.56) - -// Returns 1.23 -``` - -## Parameters - -### x -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 deleted file mode 100644 index e23493865..000000000 --- a/content/v2.0/reference/flux/functions/math/mod.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: math.mod() function -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 - parent: Math -weight: 301 ---- - -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`. - -_**Output data type:** Float_ - -```js -import "math" - -math.mod(x: 1.23, y: 4.56) - -// Returns 1.23 -``` - -## Parameters - -### x -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 deleted file mode 100644 index 58e8d07c5..000000000 --- a/content/v2.0/reference/flux/functions/math/modf.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: math.modf() function -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 - parent: Math -weight: 301 ---- - -The `math.modf()` function returns integer and fractional floating-point numbers that sum to `f`. -Both values have the same sign as `f`. - -_**Output data format:** Object_ - -```js -import "math" - -math.modf(x: 3.14) - -// Returns {int: 3, frac: 0.14000000000000012} -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index ebb54f06b..000000000 --- a/content/v2.0/reference/flux/functions/math/nan.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: math.NaN() function -description: The math.NaN() function returns an IEEE 754 “not-a-number” value. -menu: - v2_0_ref: - name: math.NaN - parent: Math -weight: 301 ---- - -The `math.NaN()` function returns an IEEE 754 “not-a-number” value. - -```js -import "math" - -math.NaN() - -// Returns NaN -``` diff --git a/content/v2.0/reference/flux/functions/math/nextafter.md b/content/v2.0/reference/flux/functions/math/nextafter.md deleted file mode 100644 index bb6f0ae27..000000000 --- a/content/v2.0/reference/flux/functions/math/nextafter.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: math.nextafter() function -description: The math.nextafter() function returns the next representable float value after `x` towards `y`. -menu: - v2_0_ref: - name: math.nextafter - parent: Math -weight: 301 ---- - -The `math.nextafter()` function returns the next representable float value after `x` towards `y`. - -_**Output data type:** Float_ - -```js -import "math" - -math.nextafter(x: 1.23, y: 4.56) - -// Returns 1.2300000000000002 -``` - -## Parameters - -### x -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 deleted file mode 100644 index 3921a8fa1..000000000 --- a/content/v2.0/reference/flux/functions/math/pow.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: math.pow() function -description: The math.pow() function returns `x**y`, the base-x exponential of y. -menu: - v2_0_ref: - name: math.pow - parent: Math -weight: 301 ---- - -The `math.pow()` function returns `x**y`, the base-x exponential of y. - -_**Output data type:** Float_ - -```js -import "math" - -math.pow(x: 2.0, y: 3.0) - -// Returns 8.0 -``` - -## Parameters - -### x -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 deleted file mode 100644 index bfd8f1f63..000000000 --- a/content/v2.0/reference/flux/functions/math/pow10.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: math.pow10() function -description: The math.pow10() function returns `10**n`, the base-10 exponential of `n`. -menu: - v2_0_ref: - name: math.pow10 - parent: Math -weight: 301 ---- - -The `math.pow10()` function returns `10**n`, the base-10 exponential of `n`. - -_**Output data type:** Float_ - -```js -import "math" - -math.pow10(n: 3) - -// Returns 1000 -``` - -## Parameters - -### n -The value used in the operation. - -_**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 deleted file mode 100644 index 41d32767c..000000000 --- a/content/v2.0/reference/flux/functions/math/remainder.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: math.remainder() function -description: The math.remainder() function returns the IEEE 754 floating-point remainder of `x / y`. -menu: - v2_0_ref: - name: math.remainder - parent: Math -weight: 301 ---- - -The `math.remainder()` function returns the IEEE 754 floating-point remainder of `x / y`. - -_**Output data type:** Float_ - -```js -import "math" - -math.remainder(x: 21.0, y: 4.0) - -// Returns 1.0 -``` - -## Parameters - -### x -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 deleted file mode 100644 index 92e040360..000000000 --- a/content/v2.0/reference/flux/functions/math/round.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.round() function -description: The math.round() function returns the nearest integer, rounding half away from zero. -menu: - v2_0_ref: - name: math.round - parent: Math -weight: 301 ---- - -The `math.round()` function returns the nearest integer, rounding half away from zero. - -_**Output data type:** Float_ - -```js -import "math" - -math.round(x: 2.12) - -// Returns 2.0 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index 5f78da74a..000000000 --- a/content/v2.0/reference/flux/functions/math/roundtoeven.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: math.roundtoeven() function -description: The math.roundtoeven() function returns the nearest integer, rounding ties to even. -menu: - v2_0_ref: - name: math.roundtoeven - parent: Math -weight: 301 ---- - -The `math.roundtoeven()` function returns the nearest integer, rounding ties to even. - -_**Output data type:** Float_ - -```js -import "math" - -math.roundtoeven(x: 3.14) -// Returns 3.0 - -math.roundtoeven(x: 3.5) -// Returns 4.0 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index e85ec18e8..000000000 --- a/content/v2.0/reference/flux/functions/math/signbit.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: math.signbit() function -description: The math.signbit() function reports whether `x` is negative or negative zero. -menu: - v2_0_ref: - name: math.signbit - parent: Math -weight: 301 ---- - -The `math.signbit()` function reports whether `x` is negative or negative zero. - -_**Output data type:** Boolean_ - -```js -import "math" - -math.signbit(x: -1.2) - -// Returns true -``` - -## Parameters - -### x -The value used in the operation. - -_**Data type:** Float_ diff --git a/content/v2.0/reference/flux/functions/math/sin.md b/content/v2.0/reference/flux/functions/math/sin.md deleted file mode 100644 index 033a005e8..000000000 --- a/content/v2.0/reference/flux/functions/math/sin.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.sin() function -description: The math.sin() function returns the sine of the radian argument `x`. -menu: - v2_0_ref: - name: math.sin - parent: Math -weight: 301 ---- - -The `math.sin()` function returns the sine of the radian argument `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.sin(x: 3.14) - -// Returns 0.0015926529164868282 -``` - -## Parameters - -### x -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 deleted file mode 100644 index 7d1e25ff2..000000000 --- a/content/v2.0/reference/flux/functions/math/sincos.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.sincos() function -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 - parent: Math -weight: 301 ---- - -The `math.sincos()` function returns the values of `math.sin(x:x)` and `math.cos(x:x)`. - -_**Output data format:** Object_ - -```js -import "math" - -math.sincos(x: 1.23) - -// Returns {sin: 0.9424888019316975, cos: 0.3342377271245026} -``` - -## Parameters - -### x -The value used in the operation. - -_**Data type:** Float_ - -## Special cases -```js -math.sincos(x: ±0) // Returns {sin: ±0, cos: 1} -math.sincos(x: ±Inf) // Returns {sin: NaN, cos: NaN} -math.sincos(x: NaN) // Returns {sin: NaN, cos: NaN} -``` diff --git a/content/v2.0/reference/flux/functions/math/sinh.md b/content/v2.0/reference/flux/functions/math/sinh.md deleted file mode 100644 index 7dd4def04..000000000 --- a/content/v2.0/reference/flux/functions/math/sinh.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.sinh() function -description: The math.sinh() function returns the hyperbolic sine of `x`. -menu: - v2_0_ref: - name: math.sinh - parent: Math -weight: 301 ---- - -The `math.sinh()` function returns the hyperbolic sine of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.sinh(x: 1.23) - -// Returns 1.564468479304407 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index f09e59fa2..000000000 --- a/content/v2.0/reference/flux/functions/math/sqrt.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: math.sqrt() function -description: The math.sqrt() function returns the square root of `x`. -menu: - v2_0_ref: - name: math.sqrt - parent: Math -weight: 301 ---- - -The `math.sqrt()` function returns the square root of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.sqrt(x: 4.0) - -// Returns 2.0 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index 3fbb9d970..000000000 --- a/content/v2.0/reference/flux/functions/math/tan.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.tan() function -description: The math.tan() function returns the tangent of the radian argument `x`. -menu: - v2_0_ref: - name: math.tan - parent: Math -weight: 301 ---- - -The `math.tan()` function returns the tangent of the radian argument `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.tan(x: 3.14) - -// Returns -0.001592654936407223 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index a468720b0..000000000 --- a/content/v2.0/reference/flux/functions/math/tanh.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.tanh() function -description: The math.tanh() function returns the hyperbolic tangent of `x`. -menu: - v2_0_ref: - name: math.tanh - parent: Math -weight: 301 ---- - -The `math.tanh()` function returns the hyperbolic tangent of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.tanh(x: 1.23) - -// Returns 0.8425793256589296 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index e787dbd80..000000000 --- a/content/v2.0/reference/flux/functions/math/trunc.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: math.trunc() function -description: The math.trunc() function returns the integer value of `x`. -menu: - v2_0_ref: - name: math.trunc - parent: Math -weight: 301 ---- - -The `math.trunc()` function returns the integer value of `x`. - -_**Output data type:** Float_ - -```js -import "math" - -math.trunc(x: 3.14) - -// Returns 3.0 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index 7dc7fab13..000000000 --- a/content/v2.0/reference/flux/functions/math/y0.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: math.y0() function -description: The math.y0() function returns the order-zero Bessel function of the second kind. -menu: - v2_0_ref: - name: math.y0 - parent: Math -weight: 301 ---- - -The `math.y0()` function returns the order-zero Bessel function of the second kind. - -_**Output data type:** Float_ - -```js -import "math" - -math.y0(x: 3.14) - -// Returns 0.3289375969127807 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index b16a38c99..000000000 --- a/content/v2.0/reference/flux/functions/math/y1.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: math.y1() function -description: The math.y1() function returns the order-one Bessel function of the second kind. -menu: - v2_0_ref: - name: math.y1 - parent: Math -weight: 301 ---- - -The `math.y1()` function returns the order-one Bessel function of the second kind. - -_**Output data type:** Float_ - -```js -import "math" - -math.y1(x: 3.14) - -// Returns 0.35853138083924085 -``` - -## Parameters - -### x -The value used in the operation. - -_**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 deleted file mode 100644 index 56b951ca5..000000000 --- a/content/v2.0/reference/flux/functions/math/yn.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: math.yn() function -description: The math.yn() function returns the order-n Bessel function of the second kind. -menu: - v2_0_ref: - name: math.yn - parent: Math -weight: 301 ---- - -The `math.yn()` function returns the order-n Bessel function of the second kind. - -_**Output data type:** Float_ - -```js -import "math" - -math.yn(n: 3, x: 3.14) - -// Returns -0.4866506930335083 -``` - -## Parameters - -### n -The order number used in the operation. - -_**Data type:** Integer_ - -### x -The value used in the operation. - -_**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 -``` diff --git a/content/v2.0/reference/flux/functions/strings/_index.md b/content/v2.0/reference/flux/functions/strings/_index.md index 282d159e8..d80cee1c1 100644 --- a/content/v2.0/reference/flux/functions/strings/_index.md +++ b/content/v2.0/reference/flux/functions/strings/_index.md @@ -1,18 +1,18 @@ --- -title: Flux strings package +title: Flux string functions description: > - The Flux string package provides functions to manipulate UTF-8 encoded strings. - Import the `strings` package. + String functions provide tools for manipulating strings in Flux. + To use them, import the `strings` package. menu: v2_0_ref: name: Strings - parent: Flux packages and functions -weight: 204 -v2.0/tags: [strings, functions, package] + parent: Flux functions +weight: 203 +v2.0/tags: [strings, functions] --- -The Flux string package provides functions to manipulate UTF-8 encoded strings. -Import the `strings` package: +String functions provide tools for manipulating strings in Flux. +To use them, import the `strings` package: ```js import "strings" diff --git a/content/v2.0/reference/flux/functions/testing/_index.md b/content/v2.0/reference/flux/functions/testing/_index.md index 1c885ae04..2586190ae 100644 --- a/content/v2.0/reference/flux/functions/testing/_index.md +++ b/content/v2.0/reference/flux/functions/testing/_index.md @@ -1,18 +1,18 @@ --- -title: Flux testing package +title: Flux testing functions description: > - The Flux testing package provides functions that test piped-forward data in specific ways. - Import the `testing` package. + Flux testing functions test piped-forward data in specific ways and return errors if the tests fail. + To use them, import the `testing` package. menu: v2_0_ref: name: Testing - parent: Flux packages and functions -weight: 205 -v2.0/tags: [testing, functions, package] + parent: Flux functions +weight: 204 +v2.0/tags: [testing, functions] --- Flux testing functions test piped-forward data in specific ways and return errors if the tests fail. -Import the `testing` package: +To use them, import the `testing` package: ```js import "testing" From 3b6a6b57878b5f18a3c38fb17327a99f240b5af0 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 15 Mar 2019 17:46:41 -0600 Subject: [PATCH 12/13] updated alpha-6 release notes --- content/v2.0/reference/release-notes.md | 37 +++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/content/v2.0/reference/release-notes.md b/content/v2.0/reference/release-notes.md index 2e2794bdd..11e38c507 100644 --- a/content/v2.0/reference/release-notes.md +++ b/content/v2.0/reference/release-notes.md @@ -7,6 +7,43 @@ menu: weight: 1 --- +## v2.0.0-alpha.6 [2019-03-15] + +### Release Notes + +{{% warn %}} +We have updated the way we do predefined dashboards to [include Templates](https://github.com/influxdata/influxdb/pull/12532) +in this release which causes existing organizations to not have a System dashboard created when they build a new Telegraf configuration. +_**Remove your bolt db and go through initial setup process again. +This will delete your tokens, dashboards, tasks, and other non-time series data**_, +but will not impact you existing time series data. +Provide a new token to anything writing data into the system. + +###### Linux and macOS +```sh +rm ~/.influxdbv2/influxd.bolt +``` + +Once completed, InfluxDB v2.0.0-alpha.5 can be started. +{{% /warn %}} + +Once completed, `v2.0.0-alpha.6` can be started. + +### Features +- Add ability to import a dashboard. +- Add ability to import a dashboard from organization view. +- Add ability to export a dashboard and a task. +- Add `run` subcommand to `influxd` binary. This is also the default when no subcommand is specified. +- Add ability to save a query as a variable from the Data Explorer. +- Add System template on onboarding. + +### Bug Fixes +- Stop scrollbars from covering text in Flux editor. + +### UI Improvements +- Fine tune keyboard interactions for managing labels from a resource card. + + ## v2.0.0-alpha.5 [2019-03-08] {{% warn %}} From 9aa64ca38e533bd5a5ac8b7daa11218d542c01be Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 15 Mar 2019 18:05:34 -0600 Subject: [PATCH 13/13] more updates to the alpha-6 release notes --- content/v2.0/reference/release-notes.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/content/v2.0/reference/release-notes.md b/content/v2.0/reference/release-notes.md index 11e38c507..0fa6e7a20 100644 --- a/content/v2.0/reference/release-notes.md +++ b/content/v2.0/reference/release-notes.md @@ -13,21 +13,19 @@ menu: {{% warn %}} We have updated the way we do predefined dashboards to [include Templates](https://github.com/influxdata/influxdb/pull/12532) -in this release which causes existing organizations to not have a System dashboard created when they build a new Telegraf configuration. -_**Remove your bolt db and go through initial setup process again. -This will delete your tokens, dashboards, tasks, and other non-time series data**_, -but will not impact you existing time series data. -Provide a new token to anything writing data into the system. +in this release which will cause existing Organizations to not have a System +dashboard created when they build a new Telegraf configuration. +In order to get this functionality, remove your existing data and start from scratch. + +_**This will remove all data from your InfluxDB v2.0 instance including time series data.**_ ###### Linux and macOS ```sh rm ~/.influxdbv2/influxd.bolt ``` -Once completed, InfluxDB v2.0.0-alpha.5 can be started. -{{% /warn %}} - Once completed, `v2.0.0-alpha.6` can be started. +{{% /warn %}} ### Features - Add ability to import a dashboard.