void update_leaf(struct l_node * leaf, tupple t)
{
unsigned int z;
leaf->count1=leaf->count1+1;
double old=leaf->count1-1;
double temp, t1,t2,t3,t4;
for(z=0;z<c2.dimension;z++)
{
temp=leaf->mean[z];
leaf->mean[z]=(leaf->mean[z]*old+t.point[z])/leaf->count1;
t1=old*pow(leaf->std[z],2)/leaf->count1;
t2=(old*pow(temp,2)+pow(t.point[z],2))/leaf->count1;
t3=pow(leaf->mean[z],2);
t4=t1+t2-t3;
cout<<t1<<"+"<<t2<<"-"<<t3<<"="<<t4;
leaf->std[z]=sqrt(t4);
}
n here leaf->mean[z] is double and t.point[z] is also of type double