# How to use the cspline formula?

I learned here that cspline is possibly suitable for my problem. Using the formula bellow for a paticular curve I have a problem and let me ask it.

$p(t)=(2t^3-3t^2+1)\cdot p(0)+(t^3-2t^2+t)\cdot m(0)+$

$+(-2t^3+3t^2)\cdot p(1) +(t^3-t^2)\cdot m(1);$

The test parameter follows.

p0 = 0 ;
m0 = 0 ;
p1 = 1 ;
m1 = 10 ;
t  = 0.05;


In my understanding of the formula , given these parameters , the formula must not result a minus value for p(t) ,for example t=0.05.Though my excel sheet outputs

p(0.05)=-0.0165 .


Is the output all right?

=(2*POWER(t,3)-3*POWER(t,2)+1)*p0+(POWER(t,3)-2*POWER(t,2)+POWER(t,1) )*m0+