unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* acosh, getting consistent results from GSL and Guile
@ 2006-08-18  5:53 Marco Maggi
  2006-08-18 13:55 ` Neil Jerram
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Maggi @ 2006-08-18  5:53 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-08-18 23:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <0J470098NBGDU4@imap0.epfl.ch>
2006-08-18 16:25 ` acosh, getting consistent results from GSL and Guile Daniel Llorens del Río
2006-08-18 23:18   ` Kevin Ryde
2006-08-18  5:53 Marco Maggi
2006-08-18 13:55 ` Neil Jerram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).