Re: final message

new topic     » goto parent     » topic index » view thread      » older message » newer message
bill said...

I don't believe you guys will ever take any notice of what an outsider has to say, but..

These are thingns of some consequence:

Primary facts:

1 There is no multiplicative inverse of zero.
2 A Greatest Common Divisor has to:
. 1 be a divisor. ie it cannot be equal to zero.
. 2 be greater than any other divisor.

. Defining GCD(0,0) = 0 doesn't satisfy either
. condition 2.1 or 2.2.

No mathematical theory defines GCD(0,0) = 0.

At some time you guys are going to have to admit that
you are seriously talking shit.

Here we go again. I'm not particularly passionate about this topic, but you have to do something with GDC(0, 0).

MATLAB said...

http://www.mathworks.com/help/techdoc/ref/gcd.html

By convention, gcd(0,0) returns a value of 0

They don't have a cited reference for this, but:

Wikipedia said...

http://en.wikipedia.org/wiki/Greatest_common_divisor#Properties

It is useful to define gcd(0, 0) = 0 and lcm(0, 0) = 0 because then the natural numbers become a complete distributive lattice with gcd as meet and lcm as join operation. This extension of the definition is also compatible with the generalization for commutative rings given below.

I would agree from a purely mathematical standpoint, GCD(0, 0) is undefined. But defining it as zero seems like a reasonable and useful convention for a computer library function.

bill said...

intdiv(-8,-3):

Dividing -8 envelopes into sets of maximum -3 is easy
1 set holds -8 envelopes. Not what you wanted?
-1 set holds 8 envelopes? - No you can't do that!
Perhaps I am wrong and you can do this. Show me!

Divide -8 envelopes into -3 sets, not so easy
-2 sets hold 3 envelopes, -1 set holds 2 envelopes or
-4 sets hold 2 envelopes, 1 set holds 0 envelopes.

I couldn't follow this bit. I'm not sure what you're trying to say. It seems to me that the return of intdiv(-8,-3) should be 2. I thought we decided that the intdiv in std/math.e was misnamed.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu