I have a couple of cases that I think scratch around at the boundaries of the current design with regards to simple calculus. I think they uncover some oddities in the current design, but I'm not entirely sure what they mean. The results acheived are far from what a novice might expect and IMO rather bizarre even to the expert.
********* Exhibit 1: (Is x==y? Shouldn't this be a syntax error?) sage: x.parent() Univariate Polynomial Ring in x over Rational Field sage: P,y=ZZ['y'].objgen() sage: f=cos(x)*sin(y) sage: f(1) (cos(1)*sin(1)) ********************* ********* Exhibit 2: (What in the world does sin(x)(1) mean?) sage: P,(x,y)=ZZ['x,y'].objgens() sage: f=sin(x) sage: f(1) sin(x)(1) sage: float(f(1)) # disaster strikes ********************* ********* Exhibit 3: (Shouldn't this be a type error?) sage: P,x=IntegerModRing(17)['x'].objgen() sage: f=sin(x) sage: f(18) sin(1) ********************* Perhaps the most important is "Exhibit 2". To my eyes, a function definition is not complete with-out a clearly defined argument list. Piggybacking on top of argument lists to polynomial rings seems like it will lead to endless pains of the nature of the creatures above. -- Joel --~--~---------~--~----~------------~-------~--~----~ 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-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---
