qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 22/22] fpu/softfloat: re-factor sqrt


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v3 22/22] fpu/softfloat: re-factor sqrt
Date: Wed, 24 Jan 2018 09:34:42 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]