[Scilab-Dev] problem with ==
Clément David
clement.david at scilab-enterprises.com
Mon Mar 2 09:56:15 CET 2015
Le vendredi 27 février 2015 à 09:51 -0700, Emil a écrit :
> sin(%pi/4)==cos(%pi/4) ans = F
It is correct as the difference is below tolerance of the machine. See
http://help.scilab.org/docs/5.5.1/en_US/percenteps.html and
http://help.scilab.org/docs/5.5.1/en_US/assert_checkalmostequal.html .
$ scilab -nwni
Scilab 5.5.1 (Feb 18 2015, 09:52:55)
-->sin(%pi/4)==cos(%pi/4)
ans =
F
-->sin(%pi/4)
ans =
0.7071068
-->cos(%pi/4)
ans =
0.7071068
-->sin(%pi/4) - cos(%pi/4)
ans =
- 1.110D-16
-->%eps
%eps =
2.220D-16
--
Clément DAVID
More information about the dev
mailing list