Implement constant evaluation of all nl functions

Fixes #22