hpcc-systems/HPCC-Platform — Issue #986: Standard HPCC Math library
Author: dabayliss
Created: 2011-11-15 18:58:57+00:00
State: open

Obviously ML will be handling a lot of the 'heavy' math side of HPCC - for now I have put these two into our Utils sub-module - but they strike me as rather more 'standard' library than 'machine learning' :

EXPORT Pi := 3.1415926535897932384626433;

EXPORT REAL8 Fac(UNSIGNED2 i) := BEGINC++
double accum = 1.0;
for ( int j = 2; j <= i; j++ )
accum *= (double)j;
return accum;
ENDC++;