From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Marco Maggi" Newsgroups: gmane.lisp.guile.user Subject: acosh, getting consistent results from GSL and Guile Date: Fri, 18 Aug 2006 07:53:00 +0200 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1155880389 1609 80.91.229.2 (18 Aug 2006 05:53:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 18 Aug 2006 05:53:09 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Aug 18 07:53:08 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 1GDxI2-00029r-BZ for guile-user@m.gmane.org; Fri, 18 Aug 2006 07:53:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GDxI1-0003YA-IX for guile-user@m.gmane.org; Fri, 18 Aug 2006 01:53:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GDxHy-0003XM-70 for guile-user@gnu.org; Fri, 18 Aug 2006 01:53:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GDxHx-0003Wd-Qj for guile-user@gnu.org; Fri, 18 Aug 2006 01:53:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GDxHx-0003WY-M3 for guile-user@gnu.org; Fri, 18 Aug 2006 01:53:01 -0400 Original-Received: from [62.241.5.253] (helo=relay-pt2.poste.it) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GDxOb-0001lm-I9 for guile-user@gnu.org; Fri, 18 Aug 2006 01:59:53 -0400 Original-Received: from poste.it (192.168.144.99) by relay-pt2.poste.it (7.2.063) (authenticated as marco.maggi-ipsu@poste.it) id 44C76BE70006B7FF for guile-user@gnu.org; Fri, 18 Aug 2006 07:53:00 +0200 X-Sensitivity: 3 Original-To: "guile-user" X-XaM3-API-Version: 4.1 (B107) X-SenderIP: 62.10.45.223 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:5452 Archived-At: Ciao, on the GNU Scientific Library mailing list I asked the following: >for some values of the operand I get different >results from 'acosh' when using GSL (1.8), Guile (1.8) >and GNU Octave (2.1.63). Other functions give me >different results, too. [...] > >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? -- Marco Maggi "They say jump!, you say how high?" Rage Against the Machine - "Bullet in the Head" _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user