changeset 6414:250eebbd7ccc

[project @ 2007-03-15 16:04:52 by jwe]
author jwe
date Thu, 15 Mar 2007 16:04:52 +0000
parents cf8e671beada
children 6b1535a09268
files liboctave/ChangeLog liboctave/lo-mappers.cc
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/ChangeLog	Thu Mar 15 14:11:51 2007 +0000
+++ b/liboctave/ChangeLog	Thu Mar 15 16:04:52 2007 +0000
@@ -1,3 +1,8 @@
+2007-03-15  John W. Eaton  <jwe@octave.org>
+
+	* lo-mappers.cc (acos): Use formula similar to what we use for asin.
+	From Alexander Barth <abarth@marine.usf.edu>.
+
 2007-03-12  John W. Eaton  <jwe@octave.org>
 
 	* oct-inttypes.h (octave_int::octave_int (double)):
--- a/liboctave/lo-mappers.cc	Thu Mar 15 14:11:51 2007 +0000
+++ b/liboctave/lo-mappers.cc	Thu Mar 15 16:04:52 2007 +0000
@@ -209,7 +209,7 @@
 {
   static Complex i (0, 1);
 
-  return (real (x) * imag (x) < 0.0) ? i * acosh (x) : -i * acosh (x);
+  return -i * (log (x + i * (sqrt (1.0 - x*x))));
 }
 
 Complex