Add numeric functions by Sam Levy (closes #1)