Re: [pure-lang-users] Proposed syntax changes
Status: Beta
Brought to you by:
agraef
From: Eddie R. <er...@bm...> - 2008-08-18 14:56:41
|
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. |