add order of magnitude function to an Integer