Re: Suggestion for 2.5

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

Hi, all!
	Some thoughts on the topic:

> Date: Wed, 19 Feb 2003 19:16:31 +0100
> From: Martin Stachon <martin.stachon at worldonline.cz>
> Subject: Re: Suggestion for 2.5
> 
> rforno wrote:
> > When crunching numbers, sometimes one gets a "division by zero" error. In
> > such cases, perhaps the useful thing to do is assign "infinite" to the
> > result (I mean the IEEE standard infinite), so that if you use he result as
> > a divisor, the new result will be zero. The following are the results for
> > zero division I propose:
> > 1 / 0 = inf
> > -1 / 0 = -inf
> 
> Given that 1 / 0 = inf, some of these expressions are indeterminate:
> (They can have any value. Sometimes, the program might expect 1, somtimes
> 0 would fit in the algorithm better.)

	The problem is that 0 is both nonnegative and nonpositive. Actually,
1/epsilon is +inf, as well as -1/-epsilon, and 1/-epsilon=-inf (epsilon
being as tiny a positive quantity as you wish). So the only thing I know
then is abs(1/0)=+inf, because 1 is as close to +epsilon as to -epsilon.
	A possible workaround could be to introduce signed zeroes (0+ and 0-).
Fior all ordinary operations, these behave like 0. But dividing by
signed zeroes may yield determinate results.
 
> > 0 / 0 = 1
> 
> Because x * 0 = 0 for any x, 0 / 0 can be anything.
> 
> > inf / 0 = inf
> > -inf / 0 = -inf
> 
> That could be right. (I am not sure)

	Not determinate, for the same reason as above, and the same remedy
works. 

> > inf / inf = 1
> > -inf / inf = -1
> > inf / -inf = -1
> > -inf / -inf = 1
> 
> x * inf = inf, so inf / inf can be anything.
> (Try to cut down an infinite long straight line into
> infinite number of parts - they can have any length)
> 
> > 1 / inf = 0
> > -1 / inf = 0
> > 1 / -inf = 0
> > -1 / -inf = 0
> 
> That's right.

	And you can get more precise results with signed zeroes.

> Some other indeterminate forms are :
> 
> inf*0

	n*(a/n) is always a. When n goes to +inf, n=+inf and a/n goes to 0. So
inf*0 can be anything, and may not be at all.

> 0^0 (although MS Windows Calculator says 0^0=1, my Casio says "Math error" smile

	1 is correct, because epsilon^0 is always 1.

> 1^inf

	Not determinate, since its log is the indeterminate 0*inf.

> inf^0

	This also has inf*0 as its log, hence it is not determinate either..

> I do not think we should play such high math agmes in our exact
> math machines. All "normal" applications would get screwed up
> with inf results anyway and those few math programs can handle
> this in its own way.
> Fun could begin with quatum based computers...
> 
>     Martin (does not have a math degree [yet])
> 

CChris

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

Search



Quick Links

User menu

Not signed in.

Misc Menu