hi Jose Luis,
By the error do you mean a NameError? There are no such global
functions defined in Sage.
I would rather use simplify_full and simplify_trig because there would
be easier to discover by a user writing simpl and pressing tab.
On the one hand it is true that for newcomers simplify_full(q) is a
more common sintax than q.simplify_full. On the other hand by the
object oriented nature of python you will never get rid of
class.function sintax entirely and once you get used, I rather tend to
use the second sintax more often.
So the question is if simplify_full is common enough to promote it to
have a top level function.
In fact the function is pretty easy
def simplify_full(q):
try:
return q.simplify()
except AttributeError:
return q
On Mar 8, 3:58 am, Juan Luis Varona <[email protected]> wrote:
> Dear sagefriends,
>
> (sorry for my English)
>
> Let us define
> var('t'); q=sin(t)^2 + cos(t)^2
> By using simplify(q) we again get
> sin(t)^2 + cos(t)^2
>
> Instead of simplify() we can use full_simplify() and trig_simplify().
> But both full_simplify(q) and trig_simplify(q) give an error message.
> You must use
> q.full_simplify()
> or
> q.trig_simplify()
> to get the answer 1.
>
> But this kind of notation as a method is very strange for many people.
>
> Wy not to add the possibility of use full_simplify(q) or similar for
> many
> other methods?
>
> Perhaps it is too complicate to implement it, I don't know...
>
> Yours,
>
> Juan Luis Varona
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org