Le 12/09/2019 à 18:55, Stéphane Mottelet a écrit :
I prefer the display after applying https://codereview.scilab.org/#/c/20981/:

--> x0=%pi/4;h=%eps/2
 h  =

   1.110D-16

--> cos(x0+%i*h)
 ans  =

   0.7071068 - 7.850D-17i

However, we could discuss if the arbitrary switch to "e" mode is desirable or not, but since Scilab 6.0 we have got used to this display mixing "v" and "e" mode...


... and IMO it's very suitable. The only rule should be that, */for a given format's width/*, */the more the number of significant displayed figures the better./* When the exponent format is used, it takes 4 or 5 digits (D+12, D+123). As a consequence, in v mode, small (absolute) values should be displayed in normal mode down to 4 non-significant 0 (e.g. 0.000012), and switched to "e" mode beyond.

In v mode, forcing the display of 0.0123456  in "e" mode on the (bad) reason that some other huge or tiny numbers in the matrix are displayed in this mode, would print 1.234D-02, and so make invisible 2 significant figures. I do not see any reason that would impose the display mode to be homogeneous over all elements of a matrix, possibly canceling the display of significant figures in the given format's width.

Regards

Samuel


_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to