Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Computing infinity modulus and zero modulus
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 43 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ju...@diegidio.name  
View profile  
 More options Feb 8 2008, 12:29 pm
Newsgroups: sci.math
Followup-To: sci.math
From: ju...@diegidio.name
Date: Fri, 8 Feb 2008 09:29:43 -0800 (PST)
Local: Fri, Feb 8 2008 12:29 pm
Subject: Computing infinity modulus and zero modulus
Please bear with me as I am a professional programmer but nothing more
than passionate about Math, so I'll simply go straight to the point in
my own "language".

I'm writing code to support Complex numbers and operations. My goal is
no operation of any kind should ever return NaN, that is no operation
should be undefined. To make the question simple, I'll focus on the
modulus operator on Reals to start from.

I have found something very promising at http://www.gwiep.net/books/parad09.htm,
and - as far as I get it - with some geometrical reasoning it defines
"zero modulus" as x%0 = 0, and infinity modulus as x%oo = x. The
problem for me is it doesn't cover all other "boundary" cases like oo
%y or oo%oo.

My question is, is there any consistent and well founded way to
achieve that goal? And, broadening a bit, what in such constructed
algebra would be 0/0 and 0^0?

Please note that, as far as I am concerned (and as far as it makes
sense), here both infinity and zero should be taken as
"constants" (yep, it is an actual program what I'm trying to build).

Thanks a lot in advance for any insights,

Julio

---------------------------------------------
Julio Di Egidio
Software Analyst / Programmer
http://julio.diegidio.name


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mariano Suárez-Alvarez  
View profile  
 More options Feb 8 2008, 2:46 pm
Newsgroups: sci.math
From: "Mariano Suárez-Alvarez" <mariano.suarezalva...@gmail.com>
Date: Fri, 8 Feb 2008 11:46:07 -0800 (PST)
Local: Fri, Feb 8 2008 2:46 pm
Subject: Re: Computing infinity modulus and zero modulus
On Feb 8, 3:29 pm, ju...@diegidio.name wrote:

The answer depends on what properties you want to preserve.
For example, it is trivial to set up a system in which
x / 0, for non zero x, is defined to be infinity, but in
that system it will no longer be true that

  (x / y) * y = x  for all x and y

-- m


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David W. Cantrell  
View profile  
 More options Feb 8 2008, 5:34 pm
Newsgroups: sci.math
From: David W. Cantrell <DWCantr...@sigmaxi.net>
Date: 08 Feb 2008 22:34:19 GMT
Local: Fri, Feb 8 2008 5:34 pm
Subject: Re: Computing infinity modulus and zero modulus

"Mariano_Suárez-Alvarez" <mariano.suarezalva...@gmail.com> wrote:
> On Feb 8, 3:29 pm, ju...@diegidio.name wrote:
> > Please bear with me as I am a professional programmer but nothing more
> > than passionate about Math, so I'll simply go straight to the point in
> > my own "language".

> > I'm writing code to support Complex numbers and operations.

Based on what you say later, you will obviously need to use some
_extension_ of the complex numbers. The simplest is the one-point
extension, C*, obtained by adjoining a single undirected infinity, oo, to
the set of complex numbers. (But unfortunately, I doubt that C* will
actually be adequate for your needs.)

> > My goal is no operation of any kind should ever return NaN, that is no
> > operation should be undefined.

To be picky: I think that Kahan would tell you that NaN is not the same as
"undefined".

But I think I understand your point:
You want operations to return _numbers_ always.

> > To make the question simple, I'll focus on the
> > modulus operator on Reals to start from.

I have my doubts that that's the best way to start, and so I'm not going to
comment on the next paragraph.

> > I have found something very promising at
> > http://www.gwiep.net/books/parad09.htm, and - as far as I get it -
> > with some geometrical reasoning it defines "zero modulus" as x%0 = 0,
> > and infinity modulus as x%oo = x. The problem for me is it doesn't
> > cover all other "boundary" cases like oo %y or oo%oo.

> > My question is, is there any consistent and well founded way to
> > achieve that goal?

For your general goal, I think most people would answer NO.

> > And, broadening a bit, what in such constructed
> > algebra would be 0/0 and 0^0?

Suppose that we're using C*. Then I suggest the following:

1.  Adopt the rule that 0*x = 0 for _all_ x.
2.  Letting /x denote the reciprocal of x, define /0 = oo and /oo = 0.
3.  Define division by x/y = x*(/y).
4.  Define log(0) = oo.
5.  Define exponentiation by x^y = exp(y*log(x)).

It would then follow that

0/0 = 0*(/0) = 0*oo = 0

and

0^0 = exp(0*log(0)) = exp(0*oo) = exp(0) = 1.

> > Please note that, as far as I am concerned (and as far as it makes
> > sense), here both infinity and zero should be taken as
> > "constants" (yep, it is an actual program what I'm trying to build).

> > Thanks a lot in advance for any insights,

> The answer depends on what properties you want to preserve.

Indeed!

> For example, it is trivial to set up a system in which
> x / 0, for non zero x, is defined to be infinity, but in
> that system it will no longer be true that

>   (x / y) * y = x  for all x and y

You say "no longer". But if we were already in the real (or complex) number
system, we had _already_ lost that property.

Of course,

(x / y) * y = x  for all x and y

is true, for example, in the system of _positive_ reals. But as soon as 0
is introduced...

David W. Cantrell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ju...@diegidio.name  
View profile  
 More options Feb 9 2008, 11:45 pm
Newsgroups: sci.math
From: ju...@diegidio.name
Date: Sat, 9 Feb 2008 20:45:14 -0800 (PST)
Local: Sat, Feb 9 2008 11:45 pm
Subject: Re: Computing infinity modulus and zero modulus
Hi back,

Thanks for the great answers!

> > The answer depends on what properties you want to preserve.

Ok, point taken. My idea is (naively expressed) that I need something
that tends to show "usual properties far from the boundaries". For
instance, my first application is a function grapher (implying parser
and calculator), and I am after something that would draw functions
"the common way" at least in "common places" across its domain. (Maybe
I could say I would still like a parabola to look like a parabola or
the Mandelbrot set to look like the Mandelbrot set, etc.)

> Suppose that we're using C*. Then I suggest the following: [...]
> But unfortunately, I doubt that C* will actually be adequate for your needs

To be honest, I can only say it looks perfect (btw, I have just read
something about the extended complex plane on Wikipedia, so it makes
even more sense to my intuition). Of course I'm eager to hear what the
inadequacies can be. Trying to contribute, here I'll tell where your
set of rules seems to lead me straight away.

- Besides, for what is worth, that I had already encountered in my
coding a smell of some "zero-prevalence" when converting polar (oo, t)
to rectangular, for t on the boundaries of quadrants;

- To have one only (the undirected) infinity lets me "draw" oo at zero
by convention, that is I can deal with one specific point: x-oo = oo
is its weird counterpart maybe, where oo is someway both the minimum
and the maximum of numbers so that both x<oo and x>oo always hold,
still it "smells consistent"...

- For functions, such as the tangent, I suppose I can keep using my
framework's built-in functions, and that dramatically simplifies my
coding (I'm coding in C#.Net, btw);

- Last but not least, for the modulus operator I finally seem to have
something, even if I don't really get consistent results. Assuming oo-
oo = 0:

Defining modulus by:

x % y = x - y * floor(x * /y)

I get the following:

0 % 0 = 0
x % 0 = x
0 % y = 0
x % oo = x
oo % y = 0
oo % oo = oo

Defining modulus by:

x % y def= x - Prod_n(y) with n>=0 that maximizes Prod_n(y)<=x

I get a different result in last case:

oo % oo = 0

Well, if my calculations are correct and supposing oo = oo, the only
thing I can add is that the result from second definition sounds more
"common" to me - in the sense I have given to this term at the
beginning of the post - but here I'm afraid I'm starting to guess.

As for now, again a big thank you both, I couldn't expect better
feedback.

-LV

On Feb 8, 10:34 pm, David W. Cantrell <DWCantr...@sigmaxi.net> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ju...@diegidio.name  
View profile  
 More options Feb 9 2008, 11:57 pm
Newsgroups: sci.math
From: ju...@diegidio.name
Date: Sat, 9 Feb 2008 20:57:32 -0800 (PST)
Local: Sat, Feb 9 2008 11:57 pm
Subject: Re: Computing infinity modulus and zero modulus
> For functions, such as the tangent, I suppose I can keep using my

framework's built-in functions

Pardon, to be precise, I mean I can keep built-in functions and
possibly discard the sign of the infinity.

-LV

On Feb 10, 4:45 am, ju...@diegidio.name wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ju...@diegidio.name  
View profile  
 More options Feb 10 2008, 12:28 am
Newsgroups: sci.math
From: ju...@diegidio.name
Date: Sat, 9 Feb 2008 21:28:35 -0800 (PST)
Local: Sun, Feb 10 2008 12:28 am
Subject: Re: Computing infinity modulus and zero modulus
And - I beg your pardon again, I promise this is the last for tonight
- please forget my rumination about oo drawn at zero: much better to
have oo as the only number with no correspondence at all on the
extended complex plane.

-LV

On Feb 10, 4:57 am, ju...@diegidio.name wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mariano Suárez-Alvarez  
View profile  
 More options Feb 10 2008, 5:36 am
Newsgroups: sci.math
From: "Mariano Suárez-Alvarez" <mariano.suarezalva...@gmail.com>
Date: Sun, 10 Feb 2008 02:36:38 -0800 (PST)
Local: Sun, Feb 10 2008 5:36 am
Subject: Re: Computing infinity modulus and zero modulus
On Feb 8, 8:34 pm, David W. Cantrell <DWCantr...@sigmaxi.net> wrote:

Huh? The equation

  (x / y) * y = x

holds for all x and y for which all the operations are
defined---this condition, of course, simply means that
y is not zero---both in the domain of real and complex
numbers.

-- m


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David W. Cantrell  
View profile  
 More options Feb 10 2008, 10:52 am
Newsgroups: sci.math
From: David W. Cantrell <DWCantr...@sigmaxi.net>
Date: 10 Feb 2008 15:52:10 GMT
Local: Sun, Feb 10 2008 10:52 am
Subject: Re: Computing infinity modulus and zero modulus

Right. But there is a big difference between "for all x and y" and "for all
x and y for which all the operations are defined"! Had you originally used
the latter qualification, I would not have made any comment.

> ---this condition, of course, simply means that
> y is not zero---both in the domain of real and complex numbers.

Yes. Therefore, in C, for example, we have

(x / y) * y = x   for all x and _nonzero_ y

while, for comparison, in C*, we have

(x / y) * y = x   for all x and _nonzero finite_ y.

[Indeed, if, as in the part I had snipped, we were to
have 0/0 = 0 and oo/oo = 0, then (x/y)*y = x also holds
if x = 0 and y is _any_ element of C*.]

To look at the comparison in a different light, the set

{(x, y) | (x/y)*y = x, x in C, y in C}

is a subset of

{(x, y) | (x/y)*y = x, x in C*, y in C*}.

David


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David W. Cantrell  
View profile  
 More options Feb 10 2008, 12:04 pm
Newsgroups: sci.math
From: David W. Cantrell <DWCantr...@sigmaxi.net>
Date: 10 Feb 2008 17:04:25 GMT
Local: Sun, Feb 10 2008 12:04 pm
Subject: Re: Computing infinity modulus and zero modulus

ju...@diegidio.name wrote:
> Hi back,

> Thanks for the great answers!

You're certainly welcome.

Well, for example, what should exp(oo) be?
There is really no good answer within C*.

> Trying to contribute, here I'll tell where your
> set of rules seems to lead me straight away.

> - Besides, for what is worth, that I had already encountered in my
> coding a smell of some "zero-prevalence" when converting polar (oo, t)
> to rectangular, for t on the boundaries of quadrants;

> - To have one only (the undirected) infinity lets me "draw" oo at zero
> by convention,

Later amended as:

> - please forget my rumination about oo drawn at zero: much better to
> have oo as the only number with no correspondence at all on the
> extended complex plane.

No correspondence on the complex plane. It's better to think of C* in
terms of the Riemann sphere.

> that is I can deal with one specific point: x-oo = oo
> is its weird counterpart maybe, where oo is someway both the minimum
> and the maximum of numbers so that both x<oo and x>oo always hold,
> still it "smells consistent"...

Hmm. Inequalities don't apply to complex numbers. But if you're thinking
about just the "extended real axis", you might enjoy my discussion of R*,
the one-point extension of R, at
<http://mathworld.wolfram.com/ProjectivelyExtendedRealNumbers.html>.
In R*, we would normally say that oo is unordered with respect to all other
elements. (Neither x<oo nor x>oo ever holds.)

> - For functions, such as the tangent, I suppose I can keep using my
> framework's built-in functions,

Later amended as:

> Pardon, to be precise, I mean I can keep built-in functions and
> possibly discard the sign of the infinity.
> and that dramatically simplifies my coding (I'm coding in C#.Net, btw);

> - Last but not least, for the modulus operator I finally seem to have
> something, even if I don't really get consistent results.
> Assuming oo - oo = 0:

IMO, that assumption is not recommendable. Normally, in R* or C*, both
oo + oo and oo - oo are left undefined. But if those were to be defined
within one of those systems, I would suggest, noting that -(oo) = oo, that
you take oo - oo = oo + oo = oo.

Since I have not given much thought to the modulo operation in R* or C*,
I'm still going to refrain from commenting on the following. Sorry. But
just remember, as Mariano said, "The answer depends on what properties you
want to preserve."

Not much of a supposition! Yes, of course, oo = oo.

David


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ju...@diegidio.name  
View profile  
 More options Feb 10 2008, 4:06 pm
Newsgroups: sci.math
From: ju...@diegidio.name
Date: Sun, 10 Feb 2008 13:06:56 -0800 (PST)
Local: Sun, Feb 10 2008 4:06 pm
Subject: Re: Computing infinity modulus and zero modulus
There is, after all, one specific property I may need to preserve: %
should always return a finite number. This may have a big impact on
the outcome of trigonometric functions. I'll try and elaborate below.

If I keep oo-oo = 0, as well as stick to the original definition of
modulo, I can get:

oo % y = 0, for every y in R*

With this in mind, and trying - as a matter of test[*] - to approach
exp(oo), if I define:

oc = oo + i*oo,   where oc in infinity in C* and oo is infinity in R*
x % y = x - n*y,  with x,y in R* and n in Nş so that n>=0 maximizes
(n*y)<=x

I get:

oo % 2*pi = 0
cos(oo) = cos(0) = 1
sin(oo) = sin(0) = 0
exp(oo) = oo
exp(i*oo) = exp(0)*cos(oo) + i*exp(0)*sin(oo) = 1*1 + i*1*0 = 1
exp(oc) = exp(oo + i*oo) = exp(oo) * exp(i*oo) = oo * 1 = oo

That is exp(oc) = exp(oo) = oo, where I'm being confident that
exp(oo)=oo is not such a problem since you specifically said there is
no good answer _within C*_ :) Could you spot any significant drawback
with this set of rules? I am going to test[*] an implementation of it!

[*Incidentally: the accepted principle in my profession is: as far as
it passes systems testing (read as far as it doesn't blow), a system
is "correct", and the problem becomes "good" testing. I guess then, in
a sense, we do solve the halting problem in everyday life, though
asymptotically (up to the next failure). This leads me to wander about
some S* set, where S is the set of correct systems for a given problem
(engineringly correct, in the sense I've just given, so on a subset of
all possible input), and oo in S* is the "universally" correct system
for that (for all?) problem(s), that is the one that would behave
correctly whichever the input, though apparently the one (always?) out
of our reach... Does it make any sense? :)]

Julio

On Feb 10, 5:04 pm, David W. Cantrell <DWCantr...@sigmaxi.net> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ju...@diegidio.name  
View profile  
 More options Feb 10 2008, 4:16 pm
Newsgroups: sci.math
From: ju...@diegidio.name
Date: Sun, 10 Feb 2008 13:16:03 -0800 (PST)
Local: Sun, Feb 10 2008 4:16 pm
Subject: Re: Computing infinity modulus and zero modulus
P.S.

> you might enjoy my discussion of R*

It's great, makes it even more clear. One thing above all:

"This [R*] might not be of much interest except for the fact that such
intervals arise in those systems of interval arithmetic that allow
division by intervals containing 0."

Can't say why, but I want this!

Julio

On Feb 10, 9:06 pm, ju...@diegidio.name wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ju...@diegidio.name  
View profile  
 More options Feb 10 2008, 4:52 pm
Newsgroups: sci.math
From: ju...@diegidio.name
Date: Sun, 10 Feb 2008 13:52:56 -0800 (PST)
Local: Sun, Feb 10 2008 4:52 pm
Subject: Re: Computing infinity modulus and zero modulus
Errata: Sorry, sometimes I make mistakes as a result of later editing
(sorry for that [R*] in your quote), sometimes for my lack of English
skills (I'm Italian): that "apparently the one (always?) out of our
reach" about oo in S* should really read "seemingly the one ...", and
"big impact" of % to trigonometric functions above should be
"significant impact" in terms of practical outcomes.

I for one surely improve through failure, as far as I can make a rule
of it: "practical", I have checked in the dictionary... :)

Julio

On Feb 10, 9:16 pm, ju...@diegidio.name wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mariano Suárez-Alvarez  
View profile  
 More options Feb 10 2008, 7:45 pm
Newsgroups: sci.math
From: "Mariano Suárez-Alvarez" <mariano.suarezalva...@gmail.com>
Date: Sun, 10 Feb 2008 16:45:27 -0800 (PST)
Local: Sun, Feb 10 2008 7:45 pm
Subject: Re: Computing infinity modulus and zero modulus
On Feb 10, 1:52 pm, David W. Cantrell <DWCantr...@sigmaxi.net> wrote:

I tend to consider the qualification "for which all operations
involved are defined" to be unnecessary pedantry: I find it
of no use to make statements about undefined things, and that
phrase only serves the purpose of excluding them.

-- m


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David W. Cantrell  
View profile  
 More options Feb 10 2008, 8:58 pm
Newsgroups: sci.math
From: David W. Cantrell <DWCantr...@sigmaxi.net>
Date: 11 Feb 2008 01:58:44 GMT
Local: Sun, Feb 10 2008 8:58 pm
Subject: Re: Computing infinity modulus and zero modulus

Well, you were the first to use that phrase in this thread.
And I certainly don't think something is "unnecessary pedantry" if it keeps
one from making an incorrect assertion.

> I find it
> of no use to make statements about undefined things, and that
> phrase only serves the purpose of excluding them.

Obviously we have a difference of opinion on this matter, and that
difference is probably irreconcilable.

As best I can tell, if, say, we were dealing with the reals (with division
by zero never defined), you would say that

x/0 = 1  for all x

is correct, although "of no use", while I would say that it is simply
incorrect.

David


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mariano Suárez-Alvarez  
View profile  
 More options Feb 10 2008, 10:16 pm
Newsgroups: sci.math
From: "Mariano Suárez-Alvarez" <mariano.suarezalva...@gmail.com>
Date: Sun, 10 Feb 2008 19:16:41 -0800 (PST)
Local: Sun, Feb 10 2008 10:16 pm
Subject: Re: Computing infinity modulus and zero modulus
On Feb 10, 11:58 pm, David W. Cantrell <DWCantr...@sigmaxi.net> wrote:

Well, in this case "x/0" by itself is already meaningless,
as "x/y" means "multiply x by the multiplicative inverse of y"
and, as you know, 0 has no multiplicative inverse. You'll
surely agree that a meaningless statement, such as "x/0 = 1",
does not become meaningful by putting a quantifier before it.
Moreover, this does not depend on whether the quantified is
bounded or not nor, in the second case, on what bound is
imposed on the variable.

Hence for your example I would simply say that the statement
is meaningless, not that it is correct.

-- m


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David W. Cantrell  
View profile  
 More options Feb 10 2008, 11:41 pm
Newsgroups: sci.math
From: David W. Cantrell <DWCantr...@sigmaxi.net>
Date: 11 Feb 2008 04:41:50 GMT
Local: Sun, Feb 10 2008 11:41 pm
Subject: Re: Computing infinity modulus and zero modulus

ju...@diegidio.name wrote:
> P.S.

> > you might enjoy my discussion of R*

> It's great, makes it even more clear. One thing above all:

> "This [R*] might not be of much interest except for the fact that such
> intervals arise in those systems of interval arithmetic that allow
> division by intervals containing 0."

> Can't say why, but I want this!

Julio,

I regret that I don't have time to look over your recent posts in detail.

As best I can tell, there is no reasonable way to do everything you want in
a system as simple as R* or C*. But above, you seem to indicate an interest
in interval arithmetic. In some system of extended interval arithmetic,
there would, IMO, be a reasonable way to do everything you want. If this
sounds good to you, I strongly recommend that you look at the work of G.
William (Bill) Walster of Sun Microsystems. I hope that you can find some
of his papers on the Web.

David


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ju...@diegidio.name  
View profile  
 More options Feb 10 2008, 11:47 pm
Newsgroups: sci.math
From: ju...@diegidio.name
Date: Sun, 10 Feb 2008 20:47:09 -0800 (PST)
Local: Sun, Feb 10 2008 11:47 pm
Subject: Re: Computing infinity modulus and zero modulus
Ok, and thank you for your invaluable support.

If I'll ever manage to ship, this discussion will make an integral
part of the documentation.

Julio

On Feb 11, 4:41 am, David W. Cantrell <DWCantr...@sigmaxi.net> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mariano Suárez-Alvarez  
View profile  
 More options Feb 11 2008, 12:18 am
Newsgroups: sci.math
From: "Mariano Suárez-Alvarez" <mariano.suarezalva...@gmail.com>
Date: Sun, 10 Feb 2008 21:18:32 -0800 (PST)
Local: Mon, Feb 11 2008 12:18 am
Subject: Re: Computing infinity modulus and zero modulus
On Feb 10, 7:06 pm, ju...@diegidio.name wrote:

For something like an extension of arithmetic, it might
be worthwhile being a little unorthodox, then, and try to
write down the actual properties that you expect your
implementation to satisfy and _then_ generate test cases
based on them.

Breaking such a tradition as the accepted principle you mention
might require a justification: in this case, that can be
amply supplied by the fact that those properties expected to
hold are going to be needed in order to document what you've
done.

> oo % 2*pi = 0
> cos(oo) = cos(0) = 1
> sin(oo) = sin(0) = 0
> exp(oo) = oo
> exp(i*oo) = exp(0)*cos(oo) + i*exp(0)*sin(oo) = 1*1 + i*1*0 = 1
> exp(oc) = exp(oo + i*oo) = exp(oo) * exp(i*oo) = oo * 1 = oo

> That is exp(oc) = exp(oo) = oo, where I'm being confident that
> exp(oo)=oo is not such a problem since you specifically said there is
> no good answer _within C*_ :) Could you spot any significant drawback
> with this set of rules? I am going to test[*] an implementation of it!

These rules imply that

  cos(oo + pi) = cos(oo) * cos(pi) - sin(oo) * sin(pi)
               = 1 * (-1) - 0 * 0
               =  -1

while

  cos(oo) = 1.

You did not state it explicitely, but I imagine that
you are assuming that oo + pi = oo. Then in your system
1 = -1.

You probably do not want that ;-)

-- m


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ju...@diegidio.name  
View profile  
 More options Feb 11 2008, 1:16 pm
Newsgroups: sci.math
From: ju...@diegidio.name
Date: Mon, 11 Feb 2008 10:16:03 -0800 (PST)
Local: Mon, Feb 11 2008 1:16 pm
Subject: Re: Computing infinity modulus and zero modulus
Hi Mariano, nice to hear from you!

Someway, by digging the Wikipedia, the inconsistency you have shown
above led me to "wheel theory", and that looks like what I was looking
for: http://en.wikipedia.org/wiki/Wheel_theory

Not that I can already envision a way to implement this extension. In
fact, I could restart with my question over, despite in slightly more
proper terms, and, for instance, still wander what cos(oo), or oo %
2pi for the sake, could ever be, though now on wheels. But, at least,
I am confident about the feasibility of the task.

As for the practical perspective, I suppose extending my algebra to
wheels implies an extension of the set of meaningful operations, and,
iif this extension leads to a "significantly" broader applicability,
then my struggle is justified. Of course, I can't yet "prove" my
premises.

Moreover, the ideal situation from my perspective is that someone had
already implemented an algebra on wheels, and that I could just apply
the basic recipe. I don't need to "reinvent the wheel", so to say.

> those properties expected to hold are going to be needed in order to document what you've done

Yep, I'll be very careful not to crash the Universe! :)

Julio

On Feb 11, 5:18 am, "Mariano Suárez-Alvarez"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David W. Cantrell  
View profile  
 More options Feb 11 2008, 3:28 pm
Newsgroups: sci.math
From: David W. Cantrell <DWCantr...@sigmaxi.net>
Date: 11 Feb 2008 20:28:25 GMT
Local: Mon, Feb 11 2008 3:28 pm
Subject: Re: Computing infinity modulus and zero modulus

ju...@diegidio.name wrote:
> Hi Mariano, nice to hear from you!

> Someway, by digging the Wikipedia, the inconsistency you have shown
> above led me to "wheel theory", and that looks like what I was looking
> for: http://en.wikipedia.org/wiki/Wheel_theory

I doubt that that is what you're looking for; otherwise, I would already
have mentioned it to you. Why is it not what you're looking for? Well, in
your first post, you specifically said that you wanted to avoid NaN. But
standard floating-point arithmetic is essentially a wheel, and the element
notated as _|_ in wheel theory is essentially the same as NaN in
floating-point arithmetic. For example, 0/0 is _|_ in a wheel and NaN in
floating point. In neither is it reasonable, IMO, to call 0/0 a "number".

> Not that I can already envision a way to implement this extension. In
> fact, I could restart with my question over, despite in slightly more
> proper terms, and, for instance, still wander what cos(oo),

It would have to be _|_, I should think.

> or oo %
> 2pi for the sake, could ever be, though now on wheels. But, at least,
> I am confident about the feasibility of the task.

> As for the practical perspective, I suppose extending my algebra to
> wheels implies an extension of the set of meaningful operations, and,
> iif this extension leads to a "significantly" broader applicability,
> then my struggle is justified. Of course, I can't yet "prove" my
> premises.

> Moreover, the ideal situation from my perspective is that someone had
> already implemented an algebra on wheels, and that I could just apply
> the basic recipe. I don't need to "reinvent the wheel", so to say.

Before you try to implement a wheel, please compare it with floating-point
arithmetic. And ask yourself how using _|_ might be preferable to using
NaN!

David


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ju...@diegidio.name  
View profile  
 More options Feb 11 2008, 4:13 pm
Newsgroups: sci.math
From: ju...@diegidio.name
Date: Mon, 11 Feb 2008 13:13:47 -0800 (PST)
Local: Mon, Feb 11 2008 4:13 pm
Subject: Re: Computing infinity modulus and zero modulus
This is too interesting not to follow up by any means... ;)

> you specifically said that you wanted to avoid NaN

Not really! "Undefined" was broader there, trying to define NaN. This
made Mr Cantrell comment, too.

This said, point taken: _|_ is NaN and floating-point is a wheel (and
I'm depressed).

Yet, the question stands, just more and more perfected:

1. Is there an algebraic system where 0/0 is a number?

2. If so, could you describe its interesting[*] properties in basic
terms?

3. And, could you provide a list of rules for computation?

Note: References always welcome.

Julio

On Feb 11, 8:28 pm, David W. Cantrell <DWCantr...@sigmaxi.net> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David W. Cantrell  
View profile  
 More options Feb 11 2008, 5:03 pm
Newsgroups: sci.math
From: David W. Cantrell <DWCantr...@sigmaxi.net>
Date: 11 Feb 2008 22:03:54 GMT
Local: Mon, Feb 11 2008 5:03 pm
Subject: Re: Computing infinity modulus and zero modulus

ju...@diegidio.name wrote:
> This is too interesting not to follow up by any means... ;)

> > you specifically said that you wanted to avoid NaN

> Not really! "Undefined" was broader there, trying to define NaN. This
> made Mr Cantrell comment, too.

> This said, point taken: _|_ is NaN and floating-point is a wheel (and
> I'm depressed).

> Yet, the question stands, just more and more perfected:

> 1. Is there an algebraic system where 0/0 is a number?

Of course, if you consider _|_ (or NaN) to be a "number", then such a
system is a wheel. But as I said, I don't consider _|_ to be a number;
indeed, NaN stands for "Not a Number".

In one of my first posts in this thread, I mentioned a system in which
0/0 = 0. I didn't mention then, but it certainly is my opinion, that if 0/0
is to be a real or complex number, 0 is the only reasonable value. [FWIW,
in J, a descendent of APL, 0/0 yields 0.]

> 2. If so, could you describe its interesting[*] properties in basic
> terms?

Please look again at that earlier post of mine. I suspect that you can
derive many of the interesting properties/rules yourself.

> 3. And, could you provide a list of rules for computation?

Ditto.

But when you say "computation", I suspect you mean computation beyond what
is strictly algebraic. For example, you want the trig functions to be
defined always. But suppose we're using R*. There is no reasonable way IMO
to define, say, sin(oo) as an element of R*. OTOH, there is a reasonable
way to define sin(oo) in an interval arithmetic: sin(oo) = [-1, 1]. And I
believe that Walster does exactly that.

David


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ju...@diegidio.name  
View profile  
 More options Feb 11 2008, 6:35 pm
Newsgroups: sci.math
From: ju...@diegidio.name
Date: Mon, 11 Feb 2008 15:35:28 -0800 (PST)
Local: Mon, Feb 11 2008 6:35 pm
Subject: Re: Computing infinity modulus and zero modulus

> I suspect you mean computation beyond what is strictly algebraic

Yes, I guess so...

> Walster does exactly that

That fact is, I couldn't manage to find any readily available paper
from Walster. I'll try again, as well as re-reading the whole
discussion ground up. At the moment, to be true, I am lost at the very
concept of "number", and I even wander what I am after.

BTW, I have also been looking at interval arithmetic on WP, but I
couldn't get the pregnancy as it gets shortly presented as a tool to
manage error propagation. There is a broader treatment on the German
WP, but I can't read German. Anyway, going back to the German article,
I now notice it shows intervals such as [-oo, oo], and this makes me
very very confident...

I'll report here in case I make any progress.

Thanks again.

Julio

On Feb 11, 10:03 pm, David W. Cantrell <DWCantr...@sigmaxi.net> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David W. Cantrell  
View profile  
 More options Feb 11 2008, 6:51 pm
Newsgroups: sci.math
From: David W. Cantrell <DWCantr...@sigmaxi.net>
Date: 11 Feb 2008 23:51:45 GMT
Local: Mon, Feb 11 2008 6:51 pm
Subject: Re: Computing infinity modulus and zero modulus

ju...@diegidio.name wrote:
> > I suspect you mean computation beyond what is strictly algebraic

> Yes, I guess so...

> > Walster does exactly that

> That fact is, I couldn't manage to find any readily available paper
> from Walster.

Hmm. I couldn't find the listing of his papers which used to be available,
so I used the Wayback Machine. Go to
<http://web.archive.org/web/20050410215323/http://www.mscs.mu.edu/~glo...>.
As best I can tell, the links there work.

David


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ju...@diegidio.name  
View profile  
 More options Feb 11 2008, 7:25 pm
Newsgroups: sci.math
From: ju...@diegidio.name
Date: Mon, 11 Feb 2008 16:25:40 -0800 (PST)
Local: Mon, Feb 11 2008 7:25 pm
Subject: Re: Computing infinity modulus and zero modulus
That's it... with Fortran 77 specification...

Bingo!!

:)

Julio

P.S. From this point on, the more I say, the more it starts to loose
sense, and I tend to believe this demonstrates that the question is
answered. I desire to thank you, David, for the patience as well as
the invaluable support. I desire to thank you, Mariano, too, because
in a sense you didn't answer, and in that I feel you may have made
this all possible. In a word, this has been a great learning and human
experience for me. I wish you the best.

On Feb 11, 11:51 pm, David W. Cantrell <DWCantr...@sigmaxi.net> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 43   Newer >
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google