help-gsl
[Top][All Lists]
Advanced

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

[Help-gsl] Problem with precision in gsl_poly_complex_solve


From: Jostein Austvik Jacobsen
Subject: [Help-gsl] Problem with precision in gsl_poly_complex_solve
Date: Mon, 22 Dec 2008 18:44:11 +0100

I compiled the test-program at
http://www.gnu.org/software/gsl/manual/html_node/Roots-of-Polynomials-Examples.htmlfor
retrieving the roots of a polynomial. I compiled the program using "
*g++ -g -Wall -I /usr/include/gsl -L /usr/lib -lgsl -lgslcblas main.cpp -o
gsltest*". However the output is as follows:

z0 = -0.809016994374947673 +0.587785252292473359
z1 = -0.809016994374947673 -0.587785252292473359
z2 = +0.309016994374947396 +0.951056516295153753
z3 = +0.309016994374947396 -0.951056516295153753
z4 = +1.000000000000000222 +0.000000000000000000

...which is only correct up to a precision of 15 decimals, while the example
output is correct up to at least 18:

z0 = -0.809016994374947451 +0.587785252292473137
z1 = -0.809016994374947451 -0.587785252292473137
z2 = +0.309016994374947451 +0.951056516295153642
z3 = +0.309016994374947451 -0.951056516295153642
z4 = +1.000000000000000000 +0.000000000000000000

I'm using g++ (Ubuntu 4.3.2-1ubuntu11) 4.3.2, libgsl0 v.1.9-3, libgsl0-dev
v.1.11-2 and 32-bits Ubuntu with kernel 2.6.24-19-generic.

What is my problem?

Jostein A. Jacobsen


reply via email to

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