[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] round-ash, a rounding arithmetic shift operator
From: |
Mark H Weaver |
Subject: |
[PATCH] round-ash, a rounding arithmetic shift operator |
Date: |
Tue, 15 Feb 2011 04:49:18 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
The first patch is trivial, but there for the sake of correctness.
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?
Mark
0001-Fix-comment-above-number-theoretic-division-tests.patch
Description: Fix comment above number-theoretic division tests
0002-Add-round-ash-a-rounding-arithmetic-shift-operator.patch
Description: Add `round-ash', a rounding arithmetic shift operator
- [PATCH] round-ash, a rounding arithmetic shift operator,
Mark H Weaver <=