Why isn't sum of logs == log of product?
3 ビュー (過去 30 日間)
古いコメントを表示
Why am I getting false for this when the answers are equal?
>> log(3) + log(4) == log(3*4)
ans =
logical
0
>> log(3) + log(4)
ans =
2.4849
>> log(3*4)
ans =
2.4849
0 件のコメント
回答 (2 件)
the cyclist
2022 年 5 月 3 日
編集済み: the cyclist
2022 年 5 月 3 日
They are equal to within double precision:
log(3) + log(4) - log(3*4)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Time Series Collections についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!