added new math function as proof of concept
could not get harmony working so put it in math.js