[Scilab-users] ">" operation error in a some case
Samuel Gougeon
sgougeon at free.fr
Fri Oct 28 00:59:07 CEST 2016
Hello Philippe,
Le 27/10/2016 21:43, philippe a écrit :
> Hi to all,
>
> Le 27/10/2016 à 09:57, Samuel Gougeon a écrit :
> >
> > It is very likely due to the fact that one or both operands are
> > complex-encoded.
> > You may check that with isreal(x) & isreal(y).
>
> I've being fighting for a long time with this problem. Most of the
> time, the variable x will contain complex value due to rounding
> errors, so it's hard to identify the problem !!!
>
> The error message is unclear because it suggest that ">" (operator n°
> 2) is undefined for "constant" variable (type "s") although 1>0
> works fine ... I think it will be better that "x>y" returns the result
> of "real(x)>real(y)" to avoid rounding problems .
.
IMO, instead of being undefined, default overloaded inequalities between
constants should be defined and display an explicit error message
telling that they are not defined for complex-encoded operands.
BR
Samuel
More information about the users
mailing list