Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: 0 illegal modulus?

by Anonymous Monk
on Sep 25, 2012 at 22:00 UTC ( [id://995640]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: 0 illegal modulus?
in thread 0 illegal modulus?

You write: If you take a definition from a random hit for "modulo mathematical definition" taken from the WWW, for instance, you'll find the definition: Two numbers a and b are said to be equal or congruent modulo N iff N|(a-b), i.e. iff their difference is exactly divisible by N. Usually (and on this page) a,b, are nonnegative and N a positive integer. We write a = b (mod N). Note that the difference has to be divisible by N. Yes, and the difference between no two different integers is divisible by zero. Therefore all integers are in different congruence classes mod 0, which is another way of saying that x mod 0 = x, as the original poster claimed. Although of course it's a matter of definition whether (1) an integer is then congruent to itself mod 0 and (2) the mod "operator" is actually that closely related to the mod "arithmetic" that it returns the name of the congruence class under arithmetic mod that number. % is probably better called "remainder" than mod, anyhow, and again it makes sense for x % 0 to be x when you talk about remainders. No matter how often you subtract zero, x remains... (but that's the same argument others have made).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-23 16:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found