From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Daniel_Llorens_del_R=EDo?= Newsgroups: gmane.lisp.guile.user Subject: Re: acosh, getting consistent results from GSL and Guile Date: Fri, 18 Aug 2006 18:25:15 +0200 Message-ID: <10AD4A65-6095-4314-9335-97AAF0D7C5FC@epfl.ch> References: <0J470098NBGDU4@imap0.epfl.ch> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1155918340 28352 80.91.229.2 (18 Aug 2006 16:25:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 18 Aug 2006 16:25:40 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Aug 18 18:25:35 2006 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GE79t-0001bb-Jy for guile-user@m.gmane.org; Fri, 18 Aug 2006 18:25:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GE79s-0003XC-SY for guile-user@m.gmane.org; Fri, 18 Aug 2006 12:25:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GE79m-0003RF-9n for guile-user@gnu.org; Fri, 18 Aug 2006 12:25:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GE79k-0003Mk-6a for guile-user@gnu.org; Fri, 18 Aug 2006 12:25:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GE79j-0003MI-NV for guile-user@gnu.org; Fri, 18 Aug 2006 12:25:11 -0400 Original-Received: from [128.178.50.26] (helo=smtp3.epfl.ch) by monty-python.gnu.org with smtp (Exim 4.52) id 1GE7GT-0001aJ-Dg for guile-user@gnu.org; Fri, 18 Aug 2006 12:32:09 -0400 Original-Received: (qmail 15525 invoked by uid 107); 18 Aug 2006 16:25:09 -0000 Original-Received: from mailav1.epfl.ch (128.178.50.190) by smtp3.epfl.ch with SMTP; 18 Aug 2006 16:25:09 -0000 Original-Received: from (128.178.50.133) by MAILAV1.epfl.ch via smtp id 5f89_1d6b9dca_2ed6_11db_8130_001143d18479; Fri, 18 Aug 2006 18:25:08 +0200 Original-Received: from tsf-wpa-2-127.epfl.ch (128.178.252.127) (authenticated) by smtp2.epfl.ch (AngelmatoPhylax SMTP proxy); Fri, 18 Aug 2006 18:25:09 +0200 In-Reply-To: <0J470098NBGDU4@imap0.epfl.ch> Original-To: guile-user@gnu.org X-Mailer: Apple Mail (2.752.2) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:5456 Archived-At: On 18 Aug, 2006, at 18:07, guile-user-request@gnu.org wrote: >> Browsing Wikipedia for acosh formulas it seems to me >> that GSL is using an equivalent of: >> >> (log (- x (sqrt (- (* x x) 1)))) >> >> while the others are using an equivalent of: >> >> (log (+ x (sqrt (- (* x x) 1)))) >> >> I'm interested in having equal results from GSL >> and Guile, [...] > > and got the following reply: > >> There are different branch cut conventions used >> by different programs. acosh or other inverse >> functions are mutiple-valued functions so the >> result is not uniquely defined. >> >> GSL uses one of the two common conventions >> (W.Kahan's) because it has better consistency with >> IEEE arithmetic. It is also used by Common >> Lisp -- see the GSL Reference manual for details and >> references. The others are using a different >> convention (Abramowitz & Stegun). As such, all the >> answers are correct. > > So, do you suggest me to override the GSL function to > make it equal to the Guile one, or vice versa? Myself, I'd be happy if only things like this didn't happen: guile> (tanh 1e3+i) +nan.0 - Daniel _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user