On 5/21/07, Robert Bradshaw <[EMAIL PROTECTED]> wrote:
> Global namespace pollution? Would the (implicit) target audience of
> degree-based trig know to look for sindeg, etc.? Would it work like
>
> sage: cosdeg(45)
> cos(pi/4)
>
> It's much better than a global state tough.
-1 to extra functions like this:
* Maple and Mathematica don't do this
* namespace polution
* people probably (a) wouldn't know to use those functions
* there are a dozen or so trig functions, and for all of them
we would have to have extra functions. Do you want to
have acscdeg(), etc.
By the way, here is what Mathematica does:
In[7]:= N[Sin[10 Degree]]
Out[7]= 0.173648
I am in favor of something more like that, though I *loathe* adding
anything further to the preparser. Maybe this is more pythonic:
sage: sin(10 * degrees)
i.e., degrees would be a Python object that represent 1 degree.
The resulting object 10 * degrees would be a number with units.
I would be interested in a general units package.
-- William
>
>
> >
>
--
William Stein
Associate Professor of Mathematics
University of Washington
http://www.williamstein.org
--~--~---------~--~----~------------~-------~--~----~
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/
-~----------~----~----~----~------~----~------~--~---