[Gambas-user] Infinities and division
benoit.minisini at gambas-basic.org
Tue Nov 29 15:23:51 CET 2022
Le 29/11/2022 à 15:14, BB a écrit :
> I'm not real good on infinite mathematics but
> If Abs((.Actual - .Predicted) / .Predicted) > 0.005 Then
> throws a "Division by zero (26)" error when .Actual = -Inf and
> .Predicted = (a normal real like) 63.665584
> Is that correct? Because to me it's a very misleading error.
Indeed. It's because "/" raises "Division by zero" as soon as it does
not return a real number.
More information about the User