https://stackoverflow.com/questions/42738640/division-in-ethereum-solidity/42739843
pragma solidity ^0.4.6; contract Divide { function percent(uint numerator, uint denominator, uint precision) public constant returns(uint quotient) { // caution, check safe-to-multiply here uint _numerator = numerator * 10 ** (precision+1); // with rounding of last digit uint _quotient = ((_numerator / denominator) + 5) / 10; return ( _quotient); } }