On 7/10/07, Ted Kosan <[EMAIL PROTECTED]> wrote: > I have found myself using numerical_approx() instead of RR() because > it is also placed at the end of the line and so is relatively easy to > locate the cursor there and add it. With RR(), one has to wrap the > code in a function and then unwrap it when finished, which I have > found takes more time (and is more error prone) than just having to > deal with code that is all at the end of a line. > > My main complaint with numerical_approx so far is that it is a lot of > typing when used for taking quick peeks at the numerical approximate > of a symbolic expression. I am thinking that a shorter method name, > perhaps .RR()..
I would be happy to introduce a short-cut alias for numerical_approx, e.g., N() or n() or ??. You can try out a few by doing this: sage: import sage.calculus.calculus sage: sage.calculus.calculus.SymbolicExpression.N = sage.calculus.calculus.SymbolicExpression.numerical_approx # all one line sage: a = sin(2) + pi + cos(2/3) sage: a.N() 4.83677734119242 Something simple like a.N() might be quite reasonable as a shortcut for a.numerical_approx(), and would be very simple to implement (just one line of code in an appropriate place). Thoughts? William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---