Stan Schymanski
unread,Feb 9, 2009, 5:35:35 AM2/9/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-support
Dear all,
For some reason, the meaning of the global constants pi and e (and
maybe others) becomes unavailable to the plot command in the following
example. Is this a bug?
----------------------------------------------------------------------
| Sage Version 3.2, Release Date: 2008-11-20 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: var('h delta phi doy t')
(h, delta, phi, doy, t)
sage: h = 1/12*pi*(t-12)
sage: delta = -23.45*pi/180*cos(2*pi*(doy+10)/365)
sage: sinbeta = cos(h)*cos(delta)*cos(phi)+sin(delta)*sin(phi)
sage: daylength = 12+24/180*arcsin(tan(phi)*sin(delta)/cos(delta))*180/
pi
sage: plot(pi*x,x,0,1)
sage: plot(exp(x),x,0,1)
sage: doy = 180
sage: phi = (30*pi/180).n()
sage: length = daylength.subs(locals()).n()
sage: t0 = 12-0.5*length
sage: t1 = 12+0.5*length
sage: plot(pi*x,x,0,1)
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (546, 0))
[...]
ValueError: free variable: pi
sage: plot(exp(x),x,0,1)
[...]
ValueError: free variable: e
Funnily enough, the following fixes the pi-problem for the time being:
sage: pi=pi.n()
But e=e.n() does not fix the e-problem.
Can anyone help?
Thanks a lot,
Stan