piclist 1999\04\28\042002a >
Thread: Almost memoryless average?
www.piclist.com/techref/mems.htm?key=memory
flavicon
face BY : Dr. Imre Bartfai email (remove spam text)



Hi,
I guess you *can* do the right shifting 3 times before addition, if you
save the shifted-out values also (it is the modulus by division with 8).
They can be also cumulated such way as the originals and at the end shift
right 3 times also right and the result is to be added to the sum of the
previous data. It requires only one more RAM cell.
I hope this helps.
Imre
P.S: Here also an example
Original        DIV by 8        Remainder
123             15              3
45               5              5
66               8              2
23               2              7
12               1              4
36               4              4
82              10              2
1               0              1
----------------------------------
388             45              28      SUM
48.5           45               3.5    AVG



On Mon, 26 Apr 1999, Matt Bennett wrote:

{Quote hidden}

<Pine.LNX.3.96.990428101013.235A-100000@prof.pmmf.hu>

In reply to: <199904261932.OAA04016@ns1.arlut.utexas.edu>
See also: www.piclist.com/techref/mems.htm?key=memory
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Almost memoryless average?

month overview.

new search...