how to use degree in sin function



.. or you could use a nonfunctional 'unit-like' solution:

degree:= %pi/180$
sin(30*degree)

hth
Wolfgang


-----Urspr?ngliche Nachricht-----
Von: Alexey Beshenov <al at beshenov.ru>
An: maxima at math.utexas.edu <maxima at math.utexas.edu>
Cc: ? ?? <bear.tw at hotmail.com>
Datum: Sonntag, 18. Januar 2009 17:27
Betreff: Re: [Maxima] how to use degree in sin function


On Sunday 18 January 2009 19:00:19 ??? ?????? wrote:
> (%i9) sin(%pi/6);
> (%o9) 1/2
> (%i10) sin(30);
> (%o10) sin(30)
>
> we have 30 degree =%pi/6 radian
> the sin function is use radian.
> how can I use degree in sin funciton
> for example
> I want input sin(30) =1/2
> I wish the students can free input degree and they can get the sin
> function answer.

deg_to_rad (x) := x*%pi/180$
sin_deg (x) := sin(deg_to_rad(x))$
sin_deg (30) => 1/2

--
Pungenday, Chaos 18 YOLD 3175
Alexey Beshenov  http://beshenov.ru/

_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima