[Gambas-user] Infinities and division

BB adamnt42 at gmail.com
Tue Nov 29 23:04:03 CET 2022


Mmmmm, debateable.

On 30/11/22 5:22 am, Jussi Lahtinen wrote:
> ... also this would be consistent with not allowing divide by zero 
> (which would be kinda x / 0 = infinity).
> And furthermore this would prevent illogical things like:
> If infinite / 1 = infinite / 2 Then Print "Yes, 1 is totally equal to 2."
>
>
> Jussi
>
(This one I do know)

Mathematically, from the "Infinite Hotel" story,

     infinity <> infinity.

But, in Gambas

     +Inf = +Inf

should be true as +Inf is not really "infinity", It's a constant 
representing "a very big number". Otherwise, the constant is generally 
useless.

bruce





More information about the User mailing list