10

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$.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
Marcus
  • 143
  • 6

1 Answers1

12

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

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

Log2[] should stop expanding out after this.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574