Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Re: 0 illegal modulus?

by mugwumpjism (Hermit)
on Jun 13, 2001 at 14:44 UTC ( #88032=note: print w/replies, xml ) Need Help??


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

I suppose that could be one flawed way to look at it. But that's got nothing to do with the common definition of the term, the etymological roots of the word "modulus", or what happens when you run this C program:

#include <stdio.h> int main() { int a,b,c; a=4; b=0; c=a % b; printf ("%d mod %d = %d\n", a,b,c); } $ gcc test.c -o test $ ./test Floating point exception $

The flaw in your statement is the comment "What does a period of 0 mean, then, but that there is no repitition." I'm sorry, but even if it means that a commonly used integer operation can be used in such a way to produce a divide by zero error, zero times any number is still zero and hence zero cannot be used as a base for a modulus.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://88032]
help
Chatterbox?
[ambrus]: Monday

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2016-12-05 11:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (80 votes). Check out past polls.