Scilab code of the respective functions can be found inside the macros directory of the Scilab To C Toolbox