<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>However, as I already said it elsewhere, some glitches such as
the following one do occur (see the display of whole x)<br>
</p>
<p>--> x=1:0.1:2<br>
x =<br>
<br>
1. 1.1 1.2 1.3 1.4 1.5 1.6 1.7000000 1.8
1.9 2.</p>
--> x(7) <br>
ans =<br>
<p> 1.6</p>
<p>--> x(7)-1.6 <br>
ans =<br>
<br>
0.<br>
<br>
--> x(8) </p>
<p> ans =<br>
<br>
1.7000000</p>
<p>--> x(8)-1.7 <br>
ans =<br>
<br>
2.220D-16</p>
<p>I think that we do agree about the fact that the actual Scilab
display<br>
</p>
<p>--> x=1:0.1:2<br>
x =<br>
<br>
1. 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.</p>
<p>--> x(7) <br>
ans =<br>
</p>
<p> 1.6</p>
<p>--> x(7)-1.6 <br>
ans =<br>
<br>
0.<br>
<br>
--> x(8) <br>
ans =<br>
<br>
1.7</p>
<p>--> x(8)-1.7 <br>
ans =<br>
<br>
2.220D-16</p>
<p>is pretty but not correct/homogeneous/honest. The display that is
obtained with the patch (first lines of this email) is
correct+honest but not homogeneous. A pretty + mathematically
correct display would be:</p>
<p> </p>
<p>--> x=1:0.1:2<br>
x =<br>
<br>
1.0000000 1.1000000 1.2000000 1.3000000 1.4000000
1.0000005 1.6000000 1.7000000 1.8000000 1.9000000
2.0000000</p>
<p>--> x(7) <br>
ans =<br>
<br>
1.6</p>
<p>--> x(8) <br>
ans =<br>
<br>
1.7000000</p>
--> x(8)-1.7 <br>
<p>
ans =<br>
<br>
2.220D-16</p>
<p>i.e. when the matrix to display is not a scalar, add always
trailing zeros for homogeneity, BUT when it is a scalar, add
trailing zeros only when the actual stored value is different from
the displayed value. <br>
</p>
<p>The first thing that you can see is that the default format(10)
would be very verbose, but this is tunable. A value of 7 would be
ok, but quite low for format("e"). <br>
</p>
<p>S.<br>
</p>
<div class="moz-cite-prefix">Le 13/09/2019 à 13:37, Stéphane
Mottelet a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:32f0b55a-963d-ea1c-9256-705d669d3c4e@utc.fr">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p><br>
</p>
<div class="moz-cite-prefix">Le 13/09/2019 à 13:07, Samuel Gougeon
a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:316628fe-a1ac-f129-0b7d-dddf68028273@free.fr">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<div class="moz-cite-prefix">Le 12/09/2019 à 18:55, Stéphane
Mottelet a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:5ca07ea9-bf8d-dd92-958c-6abac0ce5e1a@utc.fr">I
prefer the display after applying <a
class="moz-txt-link-freetext"
href="https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/codereview.scilab.org/#/c/20981/"
moz-do-not-send="true">https://codereview.scilab.org/#/c/20981/</a>:
<br>
<br>
--> x0=%pi/4;h=%eps/2 <br>
h = <br>
<br>
1.110D-16 <br>
<br>
--> cos(x0+%i*h) <br>
ans = <br>
<br>
0.7071068 - 7.850D-17i <br>
<br>
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... <br>
</blockquote>
<p><br>
</p>
<p>... and IMO it's very suitable. The only rule should be that,
<b><i>for a given format's width</i></b>, <b><i>the more the
number of significant displayed figures the better.</i></b>
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.</p>
<p>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.<br>
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.</p>
</blockquote>
I agree Samuel. <br>
<blockquote type="cite"
cite="mid:316628fe-a1ac-f129-0b7d-dddf68028273@free.fr">
<p>Regards</p>
<p>Samuel</p>
<p><br>
</p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org" moz-do-not-send="true">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users" moz-do-not-send="true">https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
<a class="moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet" moz-do-not-send="true">http://www.utc.fr/~mottelet</a>
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users">https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
<a class="moz-txt-link-freetext" href="http://www.utc.fr/~mottelet">http://www.utc.fr/~mottelet</a>
</pre>
</body>
</html>