On Sun, Sep 6, 2009 at 2:29 PM, TimDaly<d...@axiom-developer.org> wrote: > The macro > ln(x) ==> log(x) > expands log(n) so ln(n) prints as log(n)
Python does not have "macros" (whatever those are). However the equality "ln = log" is already set in Sage, so we have already that: sage: ln(x) log(x) > You could create the macro in the other form as > log(x) ==> 'ln(x) > in which case log(n) will print as ln(n) > > It is also possible to add the ln function directly to the > algebra so that it works in all cases. Nobody has bothered > in 38 years so i assume that users adapt. :-) > Frankly, I'm sort of neutral about it but I was of the opinion > that engineers tended toward ln while mathematicians tended > toward log. The lastest example from the gamma book was a > surprise and a clear counterexample. Yep. I think the vote from this dicussion for Sage was to make it so ln and log are both supported and "log" is base e by default. So in the future we'll have: sage: ln(x) ln(x) sage: log(x) log(x) That should make most people happy. Unrelated question: What's up with Axiom development these days? Is there any sort of relatively recent status report? I'm just generally curious. -- William > > > On Sep 6, 1:24 pm, William Stein <wst...@gmail.com> wrote: >> On Sun, Sep 6, 2009 at 7:06 AM, TimDaly<d...@axiom-developer.org> wrote: >> >> > I just bought the book "Gamma" by Julian Havil, a mathematician. >> > In the introduction on page xix he uses ln for the natural log. >> > From this I conclude that the notation is in current use by >> > mathematicians >> > as well as engineers such as Prof. Sadoway at MIT. >> >> > Axiom can support this by defining a macro: >> > ln(x) ==> log(x) >> >> Would it get printed and typeset as "ln" or "log" if you create such a macro? >> >> William -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---