MathGroup Archive 2002

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

Search the Archive

Re: Notation for Log[b,n]

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

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   
http://www.mathsource.com/Content/Enhancements/System/0211-587
After saving the package to the right folder evaluate the following lines:
-------------

In[1]:=  
  <<Enhancements`HoldTemporary`

In[2]:=
  $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.

-------------
Regards,
  Ted Ersek
  Get Mathematica tips, tricks from
  http://www.verbeia.com/mathematica/tips/Tricks.html





  • 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 ?