7 |
|
* 2/2/95 Greg Ward |
8 |
|
*/ |
9 |
|
|
10 |
– |
#include <stdio.h> |
10 |
|
#include <stdlib.h> |
12 |
– |
#include <string.h> |
11 |
|
#include <math.h> |
12 |
|
#include <ctype.h> |
15 |
– |
#include <sys/types.h> |
13 |
|
|
14 |
|
#include "rtprocess.h" /* getpid() */ |
15 |
|
#include "rtmath.h" |
157 |
|
putlist(abscissa, tabsize, 20); |
158 |
|
puts(");"); |
159 |
|
if (increasing) { |
160 |
+ |
printf("fx2`%s(x,i):if(x-X`%s(i),\n", locID, locID); |
161 |
|
printf("fx`%s(x):if(x-%g,if(%g-x,fx2`%s(x,%d),%d),1);\n", |
162 |
|
locID, abscissa[0], abscissa[tabsize-1], |
163 |
|
locID, tabsize, tabsize); |
166 |
– |
printf("fx2`%s(x,i):if(x-X`%s(i),\n", locID, locID); |
164 |
|
} else { |
165 |
+ |
printf("fx2`%s(x,i):if(X`%s(i)-x,\n", locID, locID); |
166 |
|
printf("fx`%s(x):if(%g-x,if(x-%g,fx2`%s(x,%d),%d),1);\n", |
167 |
|
locID, abscissa[0], abscissa[tabsize-1], |
168 |
|
locID, tabsize, tabsize); |
171 |
– |
printf("fx2`%s(x,i):if(X`%s(i)-x,\n", locID, locID); |
169 |
|
} |
170 |
|
printf("\ti+(x-X`%s(i))/(X`%s(i+1)-X`%s(i)),\n", |
171 |
|
locID, locID, locID); |