Do you know where your variables are? | |
PerlMonks |
Re: Modulus Inconsistencies (Or Calling all Mathematicians)by dragonchild (Archbishop) |
on Mar 26, 2003 at 16:50 UTC ( [id://245993]=note: print w/replies, xml ) | Need Help?? |
By the 8th grade definition of modulus, C is closer to being wrong (or Perl is more right). Modulus is usually a number in the range 0 .. ($n-1). However, it isn't "wrong" to be in the range (1 - $n) .. 0. It's just not the way most people think about it. (Kinda like saying 10/20 instead of 1/2 ...)
------ Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement. Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In Section
Seekers of Perl Wisdom
|
|