in reply to Re^3: 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?

7 * 3 = 21?
  • Comment on Re^4: Best way to make sure a number is an even multiple of another?

Replies are listed 'Best First'.
Re^5: Best way to make sure a number is an even multiple of another?
by Arunbear (Prior) on Oct 21, 2004 at 14:23 UTC
    7 is not an even number (i.e. - not divisible by 2)
      In this case, there's an overload on the word "even". You're using it in the "divisible by two" sense, whereas in this context it means "an number m divides an integer n evenly if and only if there exists an integer k such that m * k = n". Stated another way, n % m == 0.

      thor

      Feel the white light, the light within
      Be your own disciple, fan the sparks of will
      For all of us waiting, your kingdom will come

      Looking at the table of data provided by demerphq, I suspect you should parse 'even' as 'exact'.

      - another intruder with the mooring of the heat of the Perl

      By "even multiple" I think he means "integer multiple". Looking at the table he provides, he does get "odd" results ($n = 7, $m = 3, fix ($n,$m) = 3).