Getting incorrect subtraction result

If you are concerned about the small error of ~2e-8 and need more precision, you could use float64 instead of the default float32 dtype.