extern "C" double RFactorNApprox(double tau, int s, int k);