#include "utilf.h"#include "polynomial.h"Include dependency graph for polynomial.c:

Go to the source code of this file.
Functions | |
| real | polyeval (real *p, int n, real x) |
| void | polyderiv (real *p, int n, real *pderiv) |
| void | polyint (real *p, int n, real *pint) |
| void | polymul (real *p1, int n1, real *p2, int n2, real *pmul) |
| void | polyprint (real *p, int n) |
|
||||||||||||||||
|
Definition at line 13 of file polynomial.c. References real. Referenced by interface_rrdz(), interface_rzdr(), and interface_surfaces().
00014 {
00015 int i;
00016 for (i = 0; i < n - 1; i++)
00017 pderiv[i] = (real)(i + 1)*p[i+1];
00018 }
|
|
||||||||||||||||
|
Definition at line 4 of file polynomial.c. References real. Referenced by interface_rrdz(), interface_rzdr(), and interface_surfaces().
00005 {
00006 real val = p[n-1];
00007 int i;
00008 for (i = n - 2; i >= 0; i--)
00009 val = x*val + p[i];
00010 return val;
00011 }
|
|
||||||||||||||||
|
Definition at line 20 of file polynomial.c. References real. Referenced by interface_rrdz(), interface_rzdr(), and interface_surfaces().
00021 {
00022 int i;
00023 pint[0] = 0.0;
00024 for (i = 0; i < n; i++)
00025 pint[i+1] = p[i]/(real)(i + 1);
00026 }
|
|
||||||||||||||||||||||||
|
Definition at line 28 of file polynomial.c. References real. Referenced by interface_rrdz(), interface_rzdr(), and interface_surfaces().
00029 {
00030 int i, j;
00031
00032 for (i = 0; i < n1 + n2 - 1; i++)
00033 pmul[i] = 0.0;
00034 for (i = 0; i < n1; i++)
00035 for (j = 0; j < n2; j++)
00036 pmul[i + j] += p1[i]*p2[j];
00037 }
|
|
||||||||||||
|
Definition at line 39 of file polynomial.c. References real.
00040 {
00041 int i;
00042 printf("[ ");
00043 for (i = 0; i < n; i++)
00044 printf("%g ", p[i]);
00045 printf("]");
00046 }
|
1.2.18