[pure-lang-svn] SF.net SVN: pure-lang:[581] pure/trunk
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-08-23 12:49:28
|
Revision: 581 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=581&view=rev Author: agraef Date: 2008-08-23 12:49:38 +0000 (Sat, 23 Aug 2008) Log Message: ----------- Better definition for complex acosh. Modified Paths: -------------- pure/trunk/lib/math.pure pure/trunk/test/test020.log Modified: pure/trunk/lib/math.pure =================================================================== --- pure/trunk/lib/math.pure 2008-08-23 11:43:17 UTC (rev 580) +++ pure/trunk/lib/math.pure 2008-08-23 12:49:38 UTC (rev 581) @@ -230,8 +230,8 @@ asinh z@(x+:y) | asinh z@(r<:t) = ln (z+sqrt (z*z+1)); acosh z@(x+:y) | -acosh z@(r<:t) = ln (z+sqrt (z*z-1)); -// Alternative definition (Kahan). +acosh z@(r<:t) = ln (z+sqrt (z-1)*sqrt (z+1)); +// Alternative definition by Kahan. Any reason to prefer that one? // acosh z@(x+:y) | // acosh z@(r<:t) = 2*ln (sqrt ((z+1)/2)+sqrt ((z-1)/2)); atanh z@(x+:y) | Modified: pure/trunk/test/test020.log =================================================================== --- pure/trunk/test/test020.log 2008-08-23 11:43:17 UTC (rev 580) +++ pure/trunk/test/test020.log 2008-08-23 12:49:38 UTC (rev 581) @@ -514,17 +514,17 @@ acosh,1L%3L,nan acosh,(-1L)%4L,nan acosh,1+:2,1.53+:1.14 -acosh,-1+:2,-1.53+:-2.00 +acosh,-1+:2,1.53+:2.00 acosh,1+:-2,1.53+:-1.14 -acosh,-1.20+:4.30,-2.20+:-1.84 +acosh,-1.20+:4.30,2.20+:1.84 acosh,1.20+:-4.30,2.20+:-1.30 acosh,1L%2L+:1,0.926+:1.22 acosh,1L%2L+:3L%4L,0.743+:1.17 acosh,3<:1,1.80+:1.02 -acosh,3<:-2.14,-1.80+:2.12 -acosh,3.00<:-3,-1.76+:2.99 -acosh,3.10<:2.50,-1.82+:-2.47 -acosh,2L%3L<:2,-0.589+:-1.81 +acosh,3<:-2.14,1.80+:-2.12 +acosh,3.00<:-3,1.76+:-2.99 +acosh,3.10<:2.50,1.82+:2.47 +acosh,2L%3L<:2,0.589+:1.81 acosh,1L%2L<:3L%4L,0.355+:1.22 acosh,-inf,nan acosh,nan,nan This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |