in reply to Re: Best way to make sure a number is an even multiple of another?
in thread Best way to make sure a number is an even multiple of another?

$n will be small. Assume its a 16 bit integer.


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi

    Flux8


  • Comment on Re^2: Best way to make sure a number is an even multiple of another?

Replies are listed 'Best First'.
Re^3: Best way to make sure a number is an even multiple of another?
by Limbic~Region (Chancellor) on Oct 21, 2004 at 14:33 UTC
    demerphq,
    I am guilty. I am guilty of not spending enough time reading your question to see what you were asking for before jumping to conclusions. The conclusion I jumped to is that you wanted the largest factor greater than or equal to a certain number. To that end, here is code that I believe does that. While I know that this isn't what you asked for, it might be of benefit to someone.

    Cheers - L~R