sonic: avoid float sqrt() for integer input & output