Yes, I believe the small absolute errors are created by the limited floating point precision.
I.e. the grid will contain floating point values, which might not be exactly representable. Using mode="bilinear" would then most likely try to interpolate the source values. You could use mode="nearest" to get the same output.