in reply to Re^2: Clean log_10 ?
in thread Clean log_10 ?

Do you mean that the number you are taking the log of will always be a power of 10? In which case, the log will be almost an integer, so round to nearest int: $power = int($log10 + 0.5);

Otherwise, why not use sprintf "%e", $num or similar?

Dave.

Replies are listed 'Best First'.
Re^4: Clean log_10 ?
by LanX (Saint) on Nov 28, 2019 at 20:17 UTC