cast obj to float before fabs

No existing tests break with casting the obj to float before calling math.fabs.