Hello all!

I faced with a problem in the module PDL::GSL::INTERP.
I want to extrapolate data which out of range using option {Extrapolate=>1}
This is code:

#_________________
use PDL;
use PDL::GSL::INTERP;

$x=sequence(9)*0.5;
$y=pdl(qw( 0.555  0.566  0.567  0.567  0.569  0.572  0.577  0.584 0.591));

$spl=PDL::GSL::INTERP->init('akima',$x,$y);

$xx=sequence(11)*0.5;
$yy=$spl->eval($xx,{Extrapolate=>1});

print $yy;
#__________________

My computer give me result
[0.555 0.566 0.567 0.567 0.569 0.572 0.577 0.584 0.591 NaN NaN]

Why NaN? The function is very smooth. I use Slackware Linux (current update) with gsl-2.6 and PDL-2.021 compiled from sources. I try to recompile gsl and PDL. No changes. One different computer (Fedora core 22, gsl-1.16, perl-PDL-2.7.0-8.fc22.x86_64) also shows this result. However, computer with old Slackware Linux 13.37, gsl-1.14 and PDL-2.021 compiled from sources works fine
[0.555 0.566 0.567 0.567 0.569 0.572 0.577 0.584 0.591 0.598 0.605]

Where the root of the problem?

Bw, Yuri


_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to