This article essentially describes a modulo (%) operator for floats, which is well-defined and completely analogous to the integer modulo operation. I always wondered why these aren't part of the FPU command set, or at least part of modern programming languages, e.g.:
> I always wondered why these aren't part of the FPU command set, or at least part of modern programming languages
They are a part of modern (and not-so-modern) programming languages (% in Python, Rust, etc.). Even C from quarter of a century ago supports them (fmod). There are also at least two CPU instructions on x86, fprem and fprem1.
Did the % operator not work? I just tested 1 % 10 and it seemed to compile. I used the % operator in other shaders. Remember that WebGL is ultimately a sub and superset of C.