GNU Scientific Library - Bugs: bug #22651, arccosh for complex numbers -...
You are not allowed to post comments on this tracker with your current authentication level.
bug #22651: arccosh for complex numbers - branch problem?
Submitter: | -Deleted Account- <bjg> | ||
Submitted: | Tue 18 Mar 2008 08:43:04 AM UTC | ||
Category: | Accuracy problem | Severity: | 3 - Normal |
Operating System: | Status: | Invalid | |
Assigned to: | None | Open/Closed: | Closed |
Release: | 1.11 |
Wed 19 Nov 2008 09:17:18 AM UTC, comment #1: |
-Deleted Account- <bjg> |
Tue 18 Mar 2008 08:43:04 AM UTC, original submission:
From: Charles R Harris <charlesr.harris <at> gmail.com>
|
-Deleted Account- <bjg> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Follow 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2008-11-19 | bjg | Status | Need Info | Invalid | |
Open/Closed | Open | Closed | |||
Release | 1.11 |
Powered by Savane 3.13-02a9.
Corresponding source code
The information given in the email was incorrect. GSL returns the correct value +0.96 for both real and complex versions of the function.
#include <gsl/gsl_complex_math.h>
#include <math.h>
#include <stdio.h>
int main ()
{
gsl_complex z,f;
double x, y, zero = 0.0;
x = 1.5;
y = acosh(x);
GSL_SET_COMPLEX(&z, x, zero);
f = gsl_complex_arccosh(z);
printf("%.18e\n", x);
printf("%.18e\n", y);
printf("%.18e %.18e\n", GSL_REAL(z), GSL_IMAG(z));
printf("%.18e %.18e\n", GSL_REAL(f), GSL_IMAG(f));
}
$ ./a.out
1.500000000000000000e+00
9.624236501192069415e-01
1.500000000000000000e+00 0.000000000000000000e+00
9.624236501192069415e-01 -0.000000000000000000e+00