---
title: "pointless-integer-math"
description: "Detect floating-point helpers applied to converted integers."
image: "https://strider.gempir.com/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://strider.gempir.com/llms.txt
> Use this file to discover all available pages before exploring further.

# pointless-integer-math

**Default severity:** `warning`

An integer converted to floating point is already integral and finite.
Rounding it with `math.Ceil`, `math.Floor`, or `math.Trunc`, or testing it with
`math.IsNaN` or `math.IsInf`, cannot provide useful information.

## Bad

```go
rounded := math.Ceil(float64(count))
```

## Good

```go
rounded := math.Ceil(measurement)
```

Source: https://strider.gempir.com/analyzers/pointless-integer-math/index.mdx
