logistic regression in c/c++