On 01/24/2018 05:13 AM, Alex Bennée wrote:
> +/*
> + * Returns an approximation to the square root of the fraction given
> + * by `a'. Considered as an integer, `a' must be at least 2^31. If bit
> + * 0 of `aExp' (the least significant bit) is 1, the integer returned
> + * approximates 2^31*sqrt(`a'/2^31), where `a' is considered an
> + * integer. If bit 0 of `aExp' is 0, the integer returned approximates
> + * 2^31*sqrt(`a'/2^30). In either case, the approximation returned
> + * lies strictly within +/-2 of the exact value.
> + */
The commentary we copied from old softfloat is wrong.
We produce an exactly rounded result.
> + if (a.cls >= float_class_qnan) {
is_nan.
r~