How to calculate t-test from source code?

Hello,

I would like to integrate LibreOffice’s code for calculating two-tailed t-test p-value into a C program.

For example,

double p_value (double *array1, double
*array2) {

Libre Office source code translated to C here

return p_value;

}

How can I do this? I have been unable to find any code on the Internet to do this.

Thanks so much!!!
-DEC

I think better take a look in:

http://api.libreoffice.org/examples/examples.html#Cpp_examples

thanks, m.a.riosv, but I can’t find source code on that site. I can’t find this on Rosetta code either.