Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^4: Modulo of fraction?

by kaif (Friar)
on Jun 28, 2005 at 14:50 UTC ( [id://470660]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Modulo of fraction?
in thread Modulo of fraction?

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://470660]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found