Max Alekseyev on Sat, 29 Oct 2022 15:49:04 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: arithmetic operations with t_INFINITY


Well, having "oo == oo" violates the equivalence with "oo - oo == 0" where the lhs is not defined.
It is surely helpful to be able to compare finite numbers to +/- infinity, but I'm not quite sure why one would ever need to compare infinities and have "oo == oo" evaluated to 1.
Please also notice that I did not mean that we should have "oo != oo", I said that comparison (of any kind) between two infinities of the same sign should be forbidden, whether it's == or != or < or <=, that is they should result in an error.

Regards,
Max

On Sat, Oct 29, 2022 at 8:43 AM Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> wrote:
Le Sat, Oct 29, 2022 at 07:40:11AM -0400, Max Alekseyev a écrit :
> Bill, I do not quite follow. The issue you describe will not appear if
> comparison of oo with oo is forbidden (which should be the case).

Precisely we need to allow

? oo == oo
%1 = 1

First we wanted < and <= to work with oo and secondly
having an object so that x != x would break too much things.

Cheers,
Bill.