On 12/2/07, Zefram <[EMAIL PROTECTED]> wrote:
> If M and N are not contiguous, then it's more difficult because the
> desired output range is not contiguous.  Using the C-style conditional
> operator, and C syntax, how about (given M < N):
>
>         t = 4*(X == M ? 0 : 1) + 2*(Y == M ? 0 : 1) + (Z == M ? 0 : 1);
>         d = t + (t < M ? 0 : t < N-1 ? 1 : 2);
>         return 11*d;

What are you smoking, Zefram? See my message before about M and N
being arbitrary (different) digits.

-- 
Taral <[EMAIL PROTECTED]>
"Please let me know if there's any further trouble I can give you."
    -- Unknown

Reply via email to