Hello,
I have to compare numbers that are quite small – something like 10e-5 or 10e-13 etc. Is there a way to extract the exponent (or characteristic) of the numbers, so that I will be working with -5 and -13 only? (thus passing from a float64 to a more friendly number)
Is it possible to extract such characteristic from a normal number? or instance, 2 should give 0 (as in 2x10e0).
I would I convert a number into scientific? thus 2 into 2e0?
Thank you
Couldn’t you simply take the log10
of your numbers? (possibly rounding it)
julia> round(log10(1.45e-4), digits=2)
-3.84
julia> floor(log10(1.45e-4))
-4.0
6 Likes
Yes I could and I will. Thank you!