---
title: math.yn() function
description: math.yn() returns the order-n Bessel function of the second kind.
url: https://docs.influxdata.com/flux/v0/stdlib/math/yn/
estimated_tokens: 1183
product: Flux
version: v0
---

# math.yn() function

-   Flux 0.22.0+
-   View InfluxDB support

`math.yn()` returns the order-n Bessel function of the second kind.

##### Function type signature

```js
(n: int, x: float) => float
```

For more information, see [Function type signatures](/flux/v0/function-type-signatures/).

## Parameters

### n

(Required) Order number to use in the operation.

### x

(Required) Value to operate on.

## Examples

-   [Return the order-n Bessel function of a value](#return-the-order-n-bessel-function-of-a-value)
-   [Use math.yn in map](#use-mathyn-in-map)

### Return the order-n Bessel function of a value

```js
import "math"

math.yn(n: 3, x: 3.14)// -0.4866506930335083

```

### Use math.yn in map

```js
import "math"

data
    |> map(fn: (r) => ({_time: r._time, _value: math.yn(n: r.n, x: r.x)}))
```

[](#view-example-input-and-output)

View example input and output

#### Input data

| _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 |

#### Output data

| _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 |
