You might want to read https://www.jsoftware.com/papers/zero.htm
And, perhaps https://www.jsoftware.com/help/dictionary/d031.htm And, possibly https://en.wikipedia.org/wiki/Principal_value But, succinctly: the current behavior here is a consequence of deliberate design decisions and changing these parts of the language would break a lot of code. I hope this helps, -- Raul On Sat, Jan 22, 2022 at 6:59 AM Michail L. Liarmakopoulos <[email protected]> wrote: > > Hello, > > Seems I've sent the following two emails to the wrong email address. > Forwarding. > > TLDR: are there any plans implementing new features in the arithmetic with > infinities so that the indeterminate forms mentioned at the Wolfram > Mathworld link below return _. ? For example: 0%0 and _%_. > > Best regards, > Michail > > --- > Michail L. Liarmakopoulos, MSc > > ---------- Forwarded message --------- > From: Michail L. Liarmakopoulos <[email protected]> > Date: Fri, Jan 21, 2022, 08:13 > Subject: Re: A question on _. and infinities > To: <[email protected]> > > > Hello again, > > Apologies but the corresponding calculations to the 7 forms of > indeterminate expressions are the following: > > ```j > 0%0 NB. 0/0 > 0 NB. Result: 0, should have been _. > > 0*_ NB. 0*Infinity > 0 NB. Result: 0, should have been _. > > _%_ NB. Infinity/Infinity > |NaN error NB. Result: NaN error, should have been _. > | _ %_ > > _-_ NB. Infinity - Infinity > |NaN error NB. Result: NaN error, should have been _. > | _ -_ > > 0^0 NB. 0^0 > 1 NB. Result: 1, should have been _. > > _^0 NB. Infinity^0. > 1 NB. Result: 1, should have been _. > > 1^_ NB. 1^Infinity > 1 NB. Result: 1, should have been _. > > ``` > > Best regards, > > On Fri, Jan 21, 2022 at 8:04 AM Michail L. Liarmakopoulos < > [email protected]> wrote: > > > Hello all, > > > > I've been playing around with infinities _ and __ in my j903 interpreter. > > > > Most of the time it works as it should, mathematically. Examples: > > > > ```j > > 1-_ NB. 1 - Infinity > > __ NB. Result: -Infinity, correct. > > > > 1+_ NB. 1 + Infinity > > _ NB. Result: Infinity, correct. > > > > 1%0 NB. 1/0 > > _ NB. Result: Infinity, correct. > > > > -1%0 NB. -1/0 > > __ NB. Result: -Infinity, correct. > > > > 1%_ NB. 1/Infinity > > 0 NB. Result: 0, correct. > > > > _+_ NB. Infinity + Infinity > > _ NB. Result: Infinity, correct. > > > > _-__ NB. Infinity - (-Infinity) > > _ NB. Infinity, correct. > > > > _*_ NB. Infinity*Infinity > > _ NB. Infinity, correct (I guess). > > ``` > > I know that the indeterminate form _. shouldn't be used in general, > > besides a placeholder for a bad formatted data or for missing values in our > > data (as mentioned in this article > > <https://code.jsoftware.com/wiki/Vocabulary/underdot>), but I was > > wondering if you have any plans of extending the arithmetic with > > infinities, in such a way that the following operations would return the > > indeterminate form (taken from Wolfram Mathworld > > <https://mathworld.wolfram.com/Indeterminate.html>): 0%0, 0*_ , _%_, _-_, > > 0^0 and _^0, 1^_ . > > > > Here are the values I get for the above, that are not correct > > mathematically (but I suppose they have a certain reasoning behind them, > > returning the values they do return): > > > > ```j > > _ - _ NB. Infinity - Infinity > > |NaN error NB. Result: NaN error, should have been (?) _. > > | _ -_ > > > > _%_ NB. Infinity/Infinity > > |NaN error NB. Result: NaN error, should have been (?) _. > > | _ /_ > > > > 0^0 NB. 0^0 > > 1 NB. Result: 1, should have been (?) _. > > > > 0%0 NB. 0/0 > > 0 NB. Result: 0, should have been (?) _. > > > > _^_ NB. Infinity^Infinity > > _ NB. Result: Infinity, should have been (?) _. > > ``` > > > > Best regards, > > > > -- > > Michail L. Liarmakopoulos, MSc > > Linkedin <https://www.linkedin.com/in/mlliarm/> > > > > > -- > Michail L. Liarmakopoulos, MSc > Linkedin <https://www.linkedin.com/in/mlliarm/> > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
