qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 11/11] target-i386: use floatx80_log2() to imple


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 11/11] target-i386: use floatx80_log2() to implement helper_fyl2x*()
Date: Tue, 17 May 2011 08:41:57 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Thunderbird/3.1.10

On 05/15/2011 07:13 AM, Aurelien Jarno wrote:
> +    temp = floatx80_add(ST0, floatx80_one, &env->fp_status);
> +    if (!floatx80_is_neg(temp)) {
> +        temp = floatx80_add(ST0, floatx80_one, &env->fp_status);
> +        temp = floatx80_log2(temp, &env->fp_status);
> +        ST1 = floatx80_mul(ST1, temp, &env->fp_status);

While this is probably better than the existing code, you really
should be using a different series expansion than for log2.  This
expansion will be wildly inaccurate for inputs near zero.


r~



reply via email to

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