Golang math.Mod (10, 4) returns 2 - i.e. the integer part of the separation result 2.5 - but should not be a "remainder with a floating point", that is, 0.5?
The result is correct. math.Mod returns the remainder, which in this case is really 2. This is equivalent to the% operator, but for floating point numbers.