# E0095

Warning name: `nan_pattern`

A pattern uses a floating-point constant whose value is NaN (not a number).
NaN is not equal to any value, including itself, so this pattern never matches.
This warning is enabled by default.

## Erroneous example

```{literalinclude} /sources/error_codes/0095_error/top.mbt
:language: moonbit
```

The `NaN` branch is not selected even when `value` is NaN.

## Suggestion

Use `is_nan()` in a match guard instead of matching against a NaN constant:

```{literalinclude} /sources/error_codes/0095_fixed/top.mbt
:language: moonbit
```
