Fix float/double conflict

Especially, `abs` for double may be potential bug