[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] round-ash, a rounding arithmetic shift operator
From: |
Andy Wingo |
Subject: |
Re: [PATCH] round-ash, a rounding arithmetic shift operator |
Date: |
Sun, 20 Feb 2011 23:06:05 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
On Tue 15 Feb 2011 10:49, Mark H Weaver <address@hidden> writes:
> The first patch is trivial, but there for the sake of correctness.
Please apply, thanks.
> The second patch adds round-ash, a rounding arithmetic shift operator.
>
> (round-ash n count) ==> (round (* n (expt 2 count)))
>
> but it's implemented much more efficiently than that, and requires that
> both n and count are exact integers. It cannot be implemented very
> efficiently in scheme, and I needed it to normalize floating-point
> significands using the default IEEE rounding mode. I think it probably
> has wider utility. It would be great to have it in 2.0. Any chance?
I'm not sure I understand the name. There is no need to call "round" on
the result of calling "ash". Can you think of another name?
Cheers,
Andy
--
http://wingolog.org/