[Gambas-user] Infinities and division
Benoit Minisini
benoit.minisini at gambas-basic.org
Tue Nov 29 20:37:19 CET 2022
Le 29/11/2022 à 19:52, Jussi Lahtinen a écrit :
> ... 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."
>
Mmm. Yes, you're right.
It's better to raise an error as soon as we see an infinite, even if
this is not how the CPU floating point works.
If someone want to play with non-standard analysis, it's not a good idea
to rely on standard CPU floating points.
Regards,
--
Benoît Minisini.
More information about the User
mailing list