Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: 0 illegal modulus?

by Zaxo (Archbishop)
on Jun 16, 2001 at 12:31 UTC ( #89021=note: print w/ replies, xml ) Need Help??


in reply to 0 illegal modulus?

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.

After Compline,
Zaxo

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.


Comment on Re: 0 illegal modulus?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (12)
As of 2015-07-30 15:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (272 votes), past polls