User-defined functions for PCalc