[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] [bug #52351] akima.c array indexing
From: |
Patrick Alken |
Subject: |
[Bug-gsl] [bug #52351] akima.c array indexing |
Date: |
Mon, 6 Nov 2017 08:51:05 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?52351>
Summary: akima.c array indexing
Project: GNU Scientific Library
Submitted by: psa
Submitted on: Mon 06 Nov 2017 01:51:04 PM UTC
Category: Runtime error
Severity: 3 - Normal
Operating System:
Status: None
Assigned to: None
Open/Closed: Open
Release:
Discussion Lock: Any
_______________________________________________________
Details:
from th =dot= walter42 =at= gmx =dot= de
On the other hand, I think I found the root cause of the misbehavior of the
akima algorithm.
It is located in function akima_calc() in the block
if (NE_next == 0.0)
{
tL_ip1 = m[i+1]; /* here '+1' was missing; because after adding,
the graph looks much better */
}
All variables related to the next with indices have a '+1' except 'tl_ip1'.
Replacing 'm[i]' by 'm[i+1]' results in a smooth spline curve.
-----------------
sorry for not being exact enough.
I refer to the demo2.c example living in the sub-directory "interpolation".
If the plotutils are available then visualization can be done via
./demo2 | graph -T X
With Kind Regards,
Thomas
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52351>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gsl] [bug #52351] akima.c array indexing,
Patrick Alken <=