On 9/12/07, cwitty <[EMAIL PROTECTED]> wrote:

> > Seehttp://www.sagemath.org:9002/sage_trac/ticket/644
>
> Is this really a good thing?  It seems like it might get a little
> confusing, especially when you get into some more complicated cases.
>
> Assume that sin and cos are 1-argument functions, and pow and atan2
> are 2-argument functions.  What do the following mean?

I'll bite:

> (sin+cos)(1)

sin(1) + cos(1)

> (sin+1)(1)

sin(1) + 1

> (pow+atan2)(1, 2)

1^2 + atan2(1,2)

> (sin+cos)(1, 2)

Error message.

> (pow+atan2)(1)

Error message.

> (pow+sin)(1)

Error message

> (pow+sin)(1, 2)

Error message.

> (pow+sin+1)(1)

Error message.


Basically in each case distribute the call to the operands, and then
add the result.

-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
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/
-~----------~----~----~----~------~----~------~--~---

Reply via email to