Derivative of an interpol function, what to do with charfun2



f:log(%e^(-x)+sin(y))$
y0:1$
x1:0$
x2:10$
n:40$
s:float((x2-x1)/n);
results: rk(f,y,y0,[x,x1,x2,s])$
load(interpol)$
g:cspline(results)$
d:diff(g,x);
e:d-f;

I want to get some values of e between x1 and x2 and output a descrete plot
of this values. The problem is that when cspline returns function, the
function includes charfun2() functions, and when I'm trying to get for
example e(1) diff says that he expects a variable as a second argument, but
finds a number. After taking diff there shouldn't be any diffs left, but
they are written before charfun2.
e(x,y) is a <a href='
https://en.wikipedia.org/wiki/Residual_%28numerical_analysis%29'>residual</a>.

Is it at least possible in maxima?