[scilab-Users] %eps ?!

Alvaro Peliz ajpeliz at fc.ul.pt
Wed Dec 15 15:37:38 CET 2010


On 12/15/2010 01:47 PM, Frédéric Mabille wrote:
> Hi,
>
> During the computation of my program, my function "if" produce a
> strange result.
> I fact, after many investigations, I have observed a very surprising
> result.
>
> /for i = 1:10/
> /test = .4*i - 1.2 ;/
> /if test == 0 then .../
>
> But when i = 3, scilab give me : test = %eps = -2.220D-16 <> 0 !!!
> It is really awkward.
>
> Could someone have a simple solution ?
> Thx 
>
> Frédéric 
Hi dont know with scilab, but with matlab you should not mix i (index)
with i (complex number)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20101215/f4d4329b/attachment.htm>


More information about the users mailing list