dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: math

Re: math

From: Dave Wiard <>
Date: Thu, 07 Jul 2005 09:05:23 -0700

> Your code is right also. You code optimizes for speed (one less multiply)
> but is longer. His code has slightly smaller code size at the expense of
> one additional multiply.

Whoops. That cut&paste gets me into more trouble...

> If the possible values of x are really as limited as someone suggested
> they were, then the look-up table approach is the best for both code size
> and speed.

Yes, a lookup table would be much better. And yes, the possible integer
values really are 10^0...10^9 if you're to stay within [0,2^32-1].

Received on 2005-07-07

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy