Everybody, please pay attention to jepri. He's got it right.
The definition of Abel he mentions is that (perlishly):
my $num = $y*int($n) + $modulus;
This relation is uniquely satisfied by !$y && $modulus == $num
It does not involve division, allowing it to apply to algebrae lacking a multiplicative inverse (those are called modules).
It applies to floats too. Think $y = 2*$pi. Modulus is phase in that case.
Perl's % operator is really just remainder on integers, a bogosity which does not generalize well.
Don't fall into the trap of thinking your intuition or experience is a valid basis for modifying mathematical definitions. You will come to grief when a "proven correct" program crashes. You may blame math, but you will be wrong.
Update: Rereading this, I realize that it sounds directed at nella. Not the case: this is a broadcast rant. nella started a fine thread, and seems to be on the side of the angels.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||