The following efuns provide general math library functions.
Beek @ZorkMUD, Lima Bean, IdeaExchange, TMI-2, and elsewhere