Why isn't sum of logs == log of product?
Ältere Kommentare anzeigen
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
Antworten (2)
Image Analyst
am 3 Mai 2022
1 Stimme
the cyclist
am 3 Mai 2022
Bearbeitet: the cyclist
am 3 Mai 2022
They are equal to within double precision:
log(3) + log(4) - log(3*4)
Kategorien
Mehr zu Time Series Events finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!