fixed math.pow efficiency and support for nonintegers