---
title: math.is_infinite
summary: null
url: >-
  https://www.fastly.com/documentation/reference/vcl/functions/floating-point-classifications/math-is-infinite
---

```
BOOL math.is_infinite(FLOAT x)
```

**Available in:** all subroutines

Determines whether a floating point value is an infinity.
See [floating point classifications](https://www.fastly.com/documentation/reference/vcl/functions/floating-point-classifications/)
for more information.

## Example

```vcl
declare local var.f FLOAT;

set var.f = math.POS_INFINITY;
set var.f -= 1; # +∞ - 1 produces +∞
if (math.is_infinite(var.f)) {
  log "infinity";
}
```
