Re: greatest multiple algorithm
- From: Phil Carmody <thefatphil_demunged@xxxxxxxxxxx>
- Date: 29 Jun 2007 01:36:07 +0300
Bronson <pshemu@xxxxxxxxx> writes:
Hi,
i'm looking for a fast way to find greatest multiple of a, which is
smaller than b.
Recently i've used b-b%a, but maybe it could be done faster.
Any ideas?
floor(b/a)*a
If a is known in advance and within certain ranges, that's
two operations.
Phil
--
"Home taping is killing big business profits. We left this side blank
so you can help." -- Dead Kennedys, written upon the B-side of tapes of
/In God We Trust, Inc./.
.
- References:
- greatest multiple algorithm
- From: Bronson
- greatest multiple algorithm
- Prev by Date: greatest multiple algorithm
- Next by Date: Re: Adding Months to a date in assembly language
- Previous by thread: greatest multiple algorithm
- Next by thread: Re: greatest multiple algorithm
- Index(es):
Relevant Pages
|