The current implementation lacks accurrancy and prefers to be fast.
For usual color gradients that shouldn't matter: They're quite smooth, for the black-white gradient on very small length's it's easy to spot these rounding errors as they affect whole pixels one can count manually.