156 |
|
printf("X`%s(i):select(i,", locID); |
157 |
|
putlist(abscissa, tabsize, 20); |
158 |
|
puts(");"); |
159 |
< |
if (increasing) { |
159 |
> |
if (increasing) |
160 |
|
printf("fx2`%s(x,i):if(x-X`%s(i),\n", locID, locID); |
161 |
+ |
else |
162 |
+ |
printf("fx2`%s(x,i):if(X`%s(i)-x,\n", locID, locID); |
163 |
+ |
printf("\ti+(x-X`%s(i))/(X`%s(i+1)-X`%s(i)),\n", |
164 |
+ |
locID, locID, locID); |
165 |
+ |
printf("\tfx2`%s(x,i-1));\n", locID); |
166 |
+ |
if (increasing) |
167 |
|
printf("fx`%s(x):if(x-%g,if(%g-x,fx2`%s(x,%d),%d),1);\n", |
168 |
|
locID, abscissa[0], abscissa[tabsize-1], |
169 |
|
locID, tabsize, tabsize); |
170 |
< |
} else { |
165 |
< |
printf("fx2`%s(x,i):if(X`%s(i)-x,\n", locID, locID); |
170 |
> |
else |
171 |
|
printf("fx`%s(x):if(%g-x,if(x-%g,fx2`%s(x,%d),%d),1);\n", |
172 |
|
locID, abscissa[0], abscissa[tabsize-1], |
173 |
|
locID, tabsize, tabsize); |
169 |
– |
} |
170 |
– |
printf("\ti+(x-X`%s(i))/(X`%s(i+1)-X`%s(i)),\n", |
171 |
– |
locID, locID, locID); |
172 |
– |
printf("\tfx2`%s(x,i-1));\n", locID); |
174 |
|
sprintf(ourexp, "fx`%s(x)", locID); |
175 |
|
} |
176 |
|
return(ourexp); |