mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 16:44:49 +01:00
c,d in polint
This commit is contained in:
parent
d82d5d610f
commit
78a83edabf
@ -298,21 +298,15 @@ polint(LDBLE * xa, LDBLE * ya, int n, LDBLE xv, LDBLE * yv, LDBLE * dy)
|
||||
{
|
||||
int i, m, ns;
|
||||
LDBLE den, dif, dift, ho, hp, w;
|
||||
LDBLE *c, *d;
|
||||
|
||||
ns = 1;
|
||||
dif = fabs(xv - xa[1]);
|
||||
/*
|
||||
* Malloc work space
|
||||
*/
|
||||
c = (LDBLE *) PHRQ_malloc(((size_t)n + 1) * sizeof(LDBLE));
|
||||
if (c == NULL)
|
||||
malloc_error();
|
||||
d = (LDBLE *) PHRQ_malloc(((size_t)n + 1) * sizeof(LDBLE));
|
||||
if (d == NULL)
|
||||
malloc_error();
|
||||
|
||||
|
||||
std::vector<double> c, d;
|
||||
c.resize((size_t)n + 1);
|
||||
d.resize((size_t)n + 1);
|
||||
|
||||
for (i = 1; i <= n; i++)
|
||||
{
|
||||
@ -354,8 +348,6 @@ polint(LDBLE * xa, LDBLE * ya, int n, LDBLE xv, LDBLE * yv, LDBLE * dy)
|
||||
|
||||
/* *yv += (*dy = (2 * ns < (n-m) ? c[ns+1] : d[ns--])); */
|
||||
}
|
||||
c = (LDBLE *) free_check_null(c);
|
||||
d = (LDBLE *) free_check_null(d);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user