From: Eddie R. <er...@bm...> - 2008-08-18 14:59:55
|
On Mon, 2008-08-18 at 09:56 -0500, Eddie Rucker wrote: > Something bad is happening here for the complex numbers: > > > sqrt (1+:2); > 2.23606797749979*cos (t/2)+:2.23606797749979*sin (t/2) > > the angle t is missing. > > Another nice way of doing this is: > > sqrt (x+:y) = sqrt (0.5*(r+a)) +: sqrt (0.5*(r-a)) > when > r = sqrt x*x+y*y; > end; > > e.r. Oops. That r should be r = sqrt (x*x+y*y). I have to go to a Faculty Advising workshop now. Will return soon I hope. e.r. |