<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 02/10/2018 à 18:37, Adelson Oliveira
a écrit :<br>
</div>
<blockquote
cite="mid:CAOsmt4W8_FVB6EB+ZOwN3DYLqTz4sif=+tA24SZtvkTSSAGM0A@mail.gmail.com"
type="cite">
<div dir="ltr">
<div dir="ltr">
<div>Hi,<br>
<br>
</div>
<div>In scilab 6.1, I've noticed that the array<br>
<br>
</div>
<div>[8.9:0.2:9.9] does contain 8.9 and 9.9,<br>
<br>
</div>
<div>but the array,<br>
<br>
[-5.1:0.2:5.1]<br>
<br>
</div>
<div>does not contain the last element 5.1!<br>
<br>
</div>
<div>find([-5.1:0.2:5.1] == 5.1) = []<br>
</div>
<div><br>
</div>
<div>Why is that?<br>
<br>
</div>
<div>Isn't it a bug?<br>
</div>
</div>
</div>
</blockquote>
<br>
We have<br>
<tt>--> a = -5.1:0.2:5.1;</tt><tt><br>
</tt><tt>--> delta = a($)+0.2-5.1<br>
delta = <br>
8.882D-16<br>
<br>
--> delta/5.1/%eps<br>
ans =<br>
0.7843137<br>
</tt><br>
So, computing the next value leads to 5.1 <i>but with an excess</i>
within the epsilon machine.<br>
Because of this excess, this last value is not included in the
output set.<br>
<br>
I am wondering whether we could detect this kind of edge effects,
and manage them more softly.<br>
<br>
Samuel<br>
<br>
</body>
</html>