This becomes a battle of semantics. Mostly one only sees modulo arithmetic defined for integers, where the modulus needs to be a positive integer. But there are definely analogous systems that deal with fractions, and i suppose that they can be extended to reals, although taking the modulus of something (mod pi) seems pretty weird to me.
But as a mathematician, as long as the system definition is consistent, there shouldnt be any problem.
I do recall in an old (1950's) number theory book that got from a clearance rack (old crap free for the taking) from my universities math department (which i still posess), it is left as an exercise to extend modular arithmetic to include fractions. Ouch!, but such things are feasible.
I should read the link you cited, but am way too busy right now. | [reply] [Watch: Dir/Any] |
... although taking the modulus of something (mod pi) seems pretty weird ... Not only weird but for such transcendental numbers as pi or e I can imagine that the result is undefined!
CountZero "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
| [reply] [Watch: Dir/Any] |
On the contrary, mathematics makes use of "modulo 2π" (that's "2 pi") somewhat often. In particular, in discussing Fourier series, you consider functions defined on the circle, which is often thought of as the reals R modulo 2π. Most of the suggested fraction modulus functions here do the right thing.
The "niceness" of integer moduli is that the following is true: (($a % $m) + ($b % $m)) % $m == ($a + $b) % $m and (($a % $m) * ($b % $m)) % $m == ($a * $b) % $m. However, even for non-integer moduli, the former is true.
| [reply] [Watch: Dir/Any] [d/l] [select] |