why this logical expression is wrong?
古いコメントを表示
Hi,
why this statment is wrong,
>> sind(30)==0.5
ans =
0
4 件のコメント
Steven Lord
2019 年 7 月 18 日
Which release of MATLAB are you using?
Are you using the built-in sind function or one you've written or downloaded? In other words, what does this command return?
which -all sind
mohammad fallah
2019 年 7 月 18 日
Walter Roberson
2019 年 7 月 18 日
I seem to remember seeing a sind bug in the bug reports a couple of releases ago, but I cannot find that information now.
Peter Jarosi
2019 年 7 月 18 日
I think it's not a bug, because it depends on the method of approximation. That's an interesting question how developers of sind() function fixed sind(30). Whether there is an if statement in the code of sind() in order to set sind(30) exactly 1/2. :-)
採用された回答
その他の回答 (1 件)
Steven Lord
2019 年 7 月 19 日
2 投票
1 件のコメント
Peter Jarosi
2019 年 7 月 19 日
How did you fix it? Did you use a better approximation method (for instance longer Taylor series) or just put an if statement in the code of function sind()? :-)
(I'm joking)
カテゴリ
ヘルプ センター および File Exchange で Eigenvalue Problems についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!