MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Notation for Log[b,n]

  • To: mathgroup at
  • Subject: [mg34928] Re: Notation for Log[b,n]
  • From: "Ersek, Ted R" <ErsekTR at>
  • Date: Thu, 13 Jun 2002 02:38:17 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

A user wanted to ensure Mathematica would always use the for  
  Log[b,n]  instead of the equivalent form  Log[n]/Log[b]

It spent years wanting to do this sort of thing and finally came up with a
solution I like.  
The solution requires my HoldTemporary package posted at
After saving the package to the right folder evaluate the following lines:


  $PrePrint = HoldTemporary@@{#}/.Log[n_]/Log[b_]:>Log[b,n]&;

This assumes you were not using $PrePrint for anything else.  If you were
using it for something else that can be accounted for.
After evaluating the lines above output will be formatted the way you
prefer.  Let me know if you have trouble.

  Ted Ersek
  Get Mathematica tips, tricks from

  • Prev by Date: Re: Using Mathgroup Effectively -- cutting and pasting expressions
  • Next by Date: Re: Internal parameters of NDSolve, write-out of preliminary data
  • Previous by thread: Re: Notation for Log[b,n]
  • Next by thread: PolynomialQ ?