I want to know the difference between 1 and 1.0000
16 views (last 30 days)
When I do logarithms, I run into some difficulties.
And the result is a=1.0000; and log10(a)=-9.643274665532978e-15
But if I type d=1.0000,the result is d=1; log10(d)=1
Abolfazl Chaman Motlagh on 7 Sep 2021
Edited: Abolfazl Chaman Motlagh on 7 Sep 2021
first of all log10(1) should be zero!
but beside this,
i think you are reporting your workspace wich is produced after some calculation. and you thought the number you see is exactly what it is. the d3 and f1 might not be exactly what you see in workspace , it just show 4 decimal digits of them.
i am copying your code and run it here to see what i mean :
you see it is correct but here i am resolving your result to see what i meant before :
d3_ = f1 * (10^(-9.643274665532978e-15))
so d3 and f1 are not exactly what is reported in user interface of workspace. for see them more precisely call
and print them. (or use vpa function)