Re: [PATCH] round-ash, a rounding arithmetic shift operator

2011-02-22 Thread Andy Wingo
On Tue 22 Feb 2011 18:54, Mark H Weaver writes: > Andy Wingo writes: > >> On Tue 15 Feb 2011 10:49, Mark H Weaver writes: >>> The first patch is trivial, but there for the sake of correctness. >> >> Please apply, thanks. > > Ludo applied this before the 2.0.0 release. Ah, cool. > (define (r

Re: [PATCH] round-ash, a rounding arithmetic shift operator

2011-02-22 Thread Mark H Weaver
Andy Wingo writes: > On Tue 15 Feb 2011 10:49, Mark H Weaver writes: >> The first patch is trivial, but there for the sake of correctness. > > Please apply, thanks. Ludo applied this before the 2.0.0 release. >> The second patch adds round-ash, a rounding arithmetic shift operator. >> >> (ro

Re: [PATCH] round-ash, a rounding arithmetic shift operator

2011-02-20 Thread Andy Wingo
On Tue 15 Feb 2011 10:49, Mark H Weaver 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

[PATCH] round-ash, a rounding arithmetic shift operator

2011-02-15 Thread Mark H Weaver
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 integ