Max Alekseyev on Sat, 29 Oct 2022 13:41:27 +0200


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

Re: arithmetic operations with t_INFINITY


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).

Regards,
Max

On Sat, Oct 29, 2022, 5:12 AM Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> wrote:
Le Fri, Oct 28, 2022 at 04:13:49PM -0400, Max Alekseyev a écrit :
> It seems reasonable to expect that "123 + oo" or "-567 * oo" should
> evaluate in "+oo" and "-oo", respectively, but at the moment they both
> result in the "forbidden" error.
> Can support of basic arithmetic operations for t_INFINITY be added?
> Of course, undefined operations such as "oo - oo" should still produce an
> error.

When we added oo, we decided that we would not allow arithmetic operations with
infinity because they are not well defined and and not obey the usual equations:
a+x == b+x => a==b
etc.
so this can only lead to strange bugs.

Cheers,
Bill.