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!