[Scilab-users] Whay False

Carrico, Paul paul.carrico at esterline.com
Tue Aug 23 14:18:16 CEST 2016


In addition, if you test the following :
a = 2.05
b = a -2
b -0.05

ð   not equal to 0 ??? (see attachement)

format issue ? threshold one ? .. on a so basic operation ????

Paul
[cid:image001.png at 01D1FD49.2B1C9B30]




EXPORT CONTROL :
Cet email ne contient pas de données techniques
This email does not contain technical data

De : Carrico, Paul
Envoyé : mardi 23 août 2016 13:56
À : International users mailing list for Scilab. (users at lists.scilab.org)
Objet : Whay False

Hi All,

I spent a lot of time in looking for an issue in my code ; finally I found the origin but I do not understand why ... probably a very basic reason :|

Any suggestion regarding the code here after ?

Thanks

Paul
#########################################################
mode(0)

a = 2.05

entier = int(a)
reel = modulo(a,2)

if ( reel == 0.05) then
    chaine = '05'
elseif (reel == 0.5) then
    chaine = '50'
else
   chaine = '00'
end

printf("chaine = %s\n',chaine)

// Nota
reel == 0.05 // whay False ?????


EXPORT CONTROL :
Cet email ne contient pas de données techniques
This email does not contain technical data

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160823/eab17a36/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 6571 bytes
Desc: image001.png
URL: <https://lists.scilab.org/pipermail/users/attachments/20160823/eab17a36/attachment.png>


More information about the users mailing list