Very fast fixed point implementation of square root for integers.
This function is at least 6x faster than clib sqrt on x86, and (this is not a typo!) about 500x faster on ARM without FPU. It's error is less than 5% for arguments smaller than cogl_sqrti_arg_5_percent and less than 10% for narguments smaller than cogl_sqrti_arg_10_percent . The maximum argument that can be passed to this function is cogl_sqrti_arg_max.
| x |
integer value |
|
integer square root. |