From: Richard Henderson <rth@twiddle.net>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Tom Musta <tommusta@gmail.com>, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] softfloat: Fix factor 2 error for scalbn on denormal inputs
Date: Fri, 20 Dec 2013 09:34:47 -0800 [thread overview]
Message-ID: <52B47FB7.2030409@twiddle.net> (raw)
In-Reply-To: <1387490251-15944-1-git-send-email-peter.maydell@linaro.org>
On 12/19/2013 01:57 PM, Peter Maydell wrote:
> If the input to float*_scalbn() is denormal then it represents
> a number 0.[mantissabits] * 2^(1-exponentbias) (and the actual
> exponent field is all zeroes). This means that when we convert
> it to our unpacked encoding the unpacked exponent must be one
> greater than for a normal number, which represents
> 1.[mantissabits] * 2^(e-exponentbias) for an exponent field e.
>
> This meant we were giving answers too small by a factor of 2 for
> all denormal inputs.
>
> Note that the float-to-int routines also have this behaviour
> of not adjusting the exponent for denormals; however there it is
> harmless because denormals will all convert to integer zero anyway.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
At least the float128 routine needs the same fix.
I'm less certain about the floatx80 routine, since IIRC
that format has no implicit 1 bit -- it's always explicit.
r~
next prev parent reply other threads:[~2013-12-20 17:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-19 21:57 [Qemu-devel] [PATCH] softfloat: Fix factor 2 error for scalbn on denormal inputs Peter Maydell
2013-12-20 17:34 ` Richard Henderson [this message]
2013-12-20 17:48 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52B47FB7.2030409@twiddle.net \
--to=rth@twiddle.net \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=tommusta@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.