no-float-loop-counter Disallow float loop counters accumulated by repeated addition Repeated floating-point addition accumulates rounding error and may skip the intended loop bound. Instead, you SHOULD count with an integer and derive each floating-point value from that counter. - Category: correctness - Level: warning - Fix: none - Scope: module Reported for (let value: float64 = 0.0; value < 1.0; value += 0.1) { // sample the interval } Accepted for (let index: int32 = 0; index < 10; index++) { const value = (index as float64) / 10.0; } Prior art - Clippy ยท whilefloat language/linter/src/rules/correctness/nofloatloopcounter.rs:7