[pure-lang-svn] SF.net SVN: pure-lang: [399] pure/trunk/lib/math.pure
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-07-06 10:05:59
|
Revision: 399 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=399&view=rev Author: agraef Date: 2008-07-06 03:06:08 -0700 (Sun, 06 Jul 2008) Log Message: ----------- Cosmetic changes. Modified Paths: -------------- pure/trunk/lib/math.pure Modified: pure/trunk/lib/math.pure =================================================================== --- pure/trunk/lib/math.pure 2008-07-06 08:54:21 UTC (rev 398) +++ pure/trunk/lib/math.pure 2008-07-06 10:06:08 UTC (rev 399) @@ -237,9 +237,9 @@ tan (x+:y) = (sin (2*x) +: sinh (2*y)) / (cos (2*x)+cosh (2*y)); // These are best computed in rect and then converted back to polar. -sin z@(r<:t) = polar $ sin $ rect z; -cos z@(r<:t) = polar $ cos $ rect z; -tan z@(r<:t) = polar $ tan $ rect z; +sin z@(r<:t) = polar (sin (rect z)); +cos z@(r<:t) = polar (cos (rect z)); +tan z@(r<:t) = polar (tan (rect z)); // Use complex logarithms for the inverses. asin z@(x+:y) | @@ -257,9 +257,9 @@ cosh (x+:y) = cosh x*cos y +: sinh x*sin y; tanh (x+:y) = (sinh (2*x) +: sin (2*y)) / (cosh (2*x)+cos (2*y)); -sinh z@(r<:t) = polar $ sinh $ rect z; -cosh z@(r<:t) = polar $ cosh $ rect z; -tanh z@(r<:t) = polar $ tanh $ rect z; +sinh z@(r<:t) = polar (sinh (rect z)); +cosh z@(r<:t) = polar (cosh (rect z)); +tanh z@(r<:t) = polar (tanh (rect z)); asinh z@(x+:y) | asinh z@(r<:t) = ln (z+sqrt (z*z+1)); @@ -280,10 +280,10 @@ -(r<:t) = r <: t+pi; (x1+:y1) + (x2+:y2) = x1+x2 +: y1+y2; -z1@(r1<:t1)+z2@(r2<:t2) = polar $ rect z1 + rect z2; +z1@(r1<:t1)+z2@(r2<:t2) = polar (rect z1 + rect z2); (x1+:y1) - (x2+:y2) = x1-x2 +: y1-y2; -z1@(r1<:t1)-z2@(r2<:t2) = polar $ rect z1 - rect z2; +z1@(r1<:t1)-z2@(r2<:t2) = polar (rect z1 - rect z2); (x1+:y1) * (x2+:y2) = x1*x2-y1*y2 +: x1*y2+y1*x2; (r1<:t1) * (r2<:t2) = r1*r2 <: t1+t2; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |