[Scilab-users] {EXT} Re: display of complex/not real numbers, again

Dang Ngoc Chan, Christophe Christophe.Dang at sidel.com
Fri Sep 13 15:13:28 CEST 2019


Hello,

> De : Stéphane Mottelet
> Envoyé : vendredi 13 septembre 2019 14:23
>
> I think that we do agree about the fact that the actual Scilab display
> [...]
> --> x(8)
> ans  =
>
>   1.7
> --> x(8)-1.7
> ans  =
>
>   2.220D-16
> is pretty but not correct/homogeneous/honest

I don't agree about this.
The decimal number can only rarely be represented exactly in binary according to IEEE 754.

This means that there should always be trailing zeros to highlight the fact that there is a 10^-16 discrepancy between the stored value and the displayed value?
I don't find this convenient.

The fact that some people are not aware of this discrepancy can be a problem but it is the general problem of underflow or subtractive cancellation or round-off error etc.

The problem is not less important than ignoring a number is complex with a zero imaginary part, but I'm not sure it can be handled in the same way.

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer

General
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


More information about the users mailing list