content/flux/v0/stdlib/math/yn.md
math.yn() returns the order-n Bessel function of the second kind.
(n: int, x: float) => float
{{% caption %}} For more information, see Function type signatures. {{% /caption %}}
({{< req >}}) Order number to use in the operation.
({{< req >}}) Value to operate on.
import "math"
math.yn(n: 3, x: 3.14)// -0.4866506930335083
import "math"
data
|> map(fn: (r) => ({_time: r._time, _value: math.yn(n: r.n, x: r.x)}))
{{< expand-wrapper >}} {{% expand "View example input and output" %}}
| _time | x | n |
|---|---|---|
| 2021-01-01T00:00:00Z | 1.2 | 3 |
| 2021-01-01T01:00:00Z | 2.4 | 4 |
| 2021-01-01T02:00:00Z | 3.6 | 5 |
| 2021-01-01T03:00:00Z | 4.8 | 6 |
| 2021-01-01T04:00:00Z | 5.1 | 7 |
| _time | _value |
|---|---|
| 2021-01-01T00:00:00Z | -3.589899629613186 |
| 2021-01-01T01:00:00Z | -1.6023565737844263 |
| 2021-01-01T02:00:00Z | -1.0581497196727103 |
| 2021-01-01T03:00:00Z | -0.8050704522628885 |
| 2021-01-01T04:00:00Z | -1.1643613692219157 |
{{% /expand %}} {{< /expand-wrapper >}}