> = > Can't describe the game itself in detail, but basically there are three > very large bit tables, all the same length. To access a number in each > eg 9,473 =3D> 9473/14 =3D> 676 whole bytes, remainder indicates the > position in the 677th byte > = > So, anyway, this isn't fast, but it's accurate. I'm sure it could be made > a little faster but it's sufficient for my application as is > = A shift-subtract division is also accurate. Always. In your case you can multiply the dividend with 256 (just one more byte of = 0's), run the shift-subtract division until you got 3 bits in the quotient = fraction part, right shift the 3 upper bits 5 times (to get them to the 3 l= ower = bits) and then you have the byte position in the integer quotient part and = the = bit offset in the shifted fraction remainder part. /Ruben =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Ruben J=F6nsson AB Liros Electronic Box 9124, 200 39 Malm=F6, Sweden TEL INT +46 40142078 FAX INT +46 40947388 ruben@pp.sbbs.se =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist