octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #49091] MXE Octave 4.20-rc1: test mappers.cc-t


From: Rik
Subject: [Octave-bug-tracker] [bug #49091] MXE Octave 4.20-rc1: test mappers.cc-tst fails
Date: Wed, 14 Sep 2016 22:17:54 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Update of bug #49091 (project octave):

                  Status:                    None => Confirmed              

    _______________________________________________________

Follow-up Comment #1:

I guess the question is why acosh (10i) is different from acosh (-10i).  On
Linux they are the same.  But on Windows, I get


>> acosh (10i)
ans =  2.99822295029797 + 1.57079632679490i
>> acosh (-10i)
ans =  2.99822295029798 - 1.57079632679490i


In liboctave/libnumeric/lo-specfun.cc the acosh function is defined as



    Complex
    acosh (const Complex& x)
    {
#if defined (HAVE_COMPLEX_STD_ACOSH)
      return std::acosh (x);
#else
      return log (x + sqrt (x + 1.0) * sqrt (x - 1.0));
#endif
    }


If I execute the #else path in Octave I get the right answer.


x =   0 + 10i
>> log (x + sqrt (x + 1.0) * sqrt (x - 1.0))
ans =  2.99822295029797 + 1.57079632679490i
>> x = -10i
x =  -0 - 10i
>> log (x + sqrt (x + 1.0) * sqrt (x - 1.0))
ans =  2.99822295029797 - 1.57079632679490i


I don't know how MXE Octave was build, but this suggests that the std library
might be at fault on Windows.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49091>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]