extern "C" double RFactorKappaApprox(double tau, double k);