Engine inaccuracies with modulo

I am experimenting around with a cube based world consisting only of 25 by 25 cm cubes. I have a subroutine which Tests if a cube is aligned by testing if x%25 is 0, y and z as well. Everything was fine until some random cubes were testet negatively. I checked, and These cubes had Locations like 49.99999 etc, even though cubes can only be places with coordinates that are multitudes of 25. Any idea how to deal with These small inaccuracies? Or any idea how I might have produced them myself?
This is an overview of my blueprint.

Hm, I “fixed” it by rounding the world Location vector to int before spawning the cubes. Still a weird issue…

Not weird at all. That’s how floating point math works. That’s why there are “Nearly Equal” nodes. Good rule of thumb is never comparing floats by simple == operator.

Hm, thanks, that is good to know. The thing 49.99999%25 is not nearly equal 0. Do I need to work around that as well or is the modulo approach maybe just not right for that sort of thing?