math: add a non-dummy tgamma implementation