another separate little module for math utils (including this one and the next at least) would be nice, but i won't insist.