Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: 0 illegal modulus?

by jepri (Parson)
on Jun 16, 2001 at 07:35 UTC ( #89002=note: print w/ replies, xml ) Need Help??


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

You say:

ps. why would I want to read a book on number theory to understand why a basic operator behaves the way it does?

The answer is "So you know what you are talking about". I admit I was too quick off the gun as well, however. After some further research I found that the modulo function was devised by Abel in the 1700's to allow him to study large and complicated groups with only pencil and paper.

Modulo is hardly a basic operator. It's just a basic operator for you because you've only ever used it in simple situations.

Computer implementations of functions are usually nasty bastardisations of real math functions. This is why the original poster mentioned Knuth, who did a lot of work involving math and computers.

Incidentally, 'proof by random web pages' is a poor way of proving that you are right.

____________________
Jeremy
I didn't believe in evil until I dated it.


Comment on Re: 0 illegal modulus?
Re: Re: 0 illegal modulus?
by mugwumpjism (Hermit) on Jun 18, 2001 at 13:16 UTC

    (On reading a book to understand a simple principle)

    You obviously don't get it. You can't expect someone who uses the % operator to have read a book on number theory first. Therefore it should behave intuitively and comply with what the commonly accepted understanding of the term is, so long as it is sensible and consistent. I think I have demonstrated in other posts that a modulus of 0 is neither sensible nor consistent, except with one contrived definition of modulus which I still think is bogus.

    You say a modulus is defined one way; I say another. Who is to say who is right, or whether being "right" means anything? Let's end this rant and agree to disagree.

      This is all so terribly familiar. I grew up programming (literally). Calculus at school was easy for me, because while the class was trying to understand what a function was, I was writing recursive ones. Simple simple simple. I taught myself math above my level so I could do tricks with my computer. I'm not boasting. The young monks here would have outshone me, but I was ahead of my classmates.

      Math was so easy. But looking back every so often someone would point out something that didn't quite fit, I would call them stupid and sneer at them (like you have repeatedly in this thread) and they would go away.

      It wasn't until I was taking advanced math at uni that I finally had it made completely clear to me what a twat I was being. The work was easy, except the lecturer kept focussing on stupid exceptions, like asymptotes, dividing functions in stupid situations, etc. The penny finally dropped that the real game was working with those exceptions, not the easy, 'intuitive' stuff.

      Your educators have not been completely forthcoming. Pretty much everything you are told is a gross over-simplification or half-truth. The more honest amoung them will tell you that you get the lite version.

      It would be possible for you to spend your whole life not understanding things better by belittling and attacking anyone who disagrees with you. This would be a shame, because it seems you are the kind of person who would get a kick out of the tougher stuff. Group theory might not be the best place to start, but it is relevent to many programs and techniques, so you would quickly begin to see it all over the place.

      I would encourage you to start looking at things a bit more closely, with the thought in mind 'Why do people care so much about this?'. Often there's a reason, it's just hard to understand when you come at it from a different angle to most people who use it. Feel free to ask questions that are a bit 'off-topic', there's an amazing body of knowledge here.

      ____________________
      Jeremy
      I didn't believe in evil until I dated it.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2014-09-21 16:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (172 votes), past polls