docs-v2/content/influxdb/cloud/reference/flux/stdlib/math/frexp.md

1014 B
Raw Blame History

title description aliases menu weight
math.frexp() function 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).
/influxdb/cloud/reference/flux/functions/math/frexp/
influxdb_cloud_ref
name parent
math.frexp Math
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: Record

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

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}