hypot workaround