9
$\begingroup$

How to ask Mathematica to display all the logarithms (in output) in base 2? Instead it always displays in base $e$.

Very often, I need to do a lot of things with mixed expressions having some $\log_2$ terms. But Mathematica always converts every $\log_2$ into $\ln$. So I was wondering how to ask Mathematica to retain the $\log_2$.

$\endgroup$
11
$\begingroup$

As mentioned in previous answers, there is an undocumented(!) setting for this:

SetSystemOptions["SimplificationOptions" -> "AutosimplifyTwoArgumentLog" -> False];

Log2[] should stop expanding out after this.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.