[WIP] Special functions

Preliminary support for special functions