abdk-libraries-solidity
abdk-libraries-solidity copied to clipboard
I want to implement 4.pow(0.5)
Can you help me, I want to implement 4.pow(0.5) This calculation What should I do
// x^y
// this can calculate 2^1.5 | 1.5 ^ 2 | 1.5^1.5 etc.
function pow(bytes16 x,uint256 y) private pure returns(bytes16 result) {
return ABDKMathQuad.pow_2(ABDKMathQuad.fromUInt(y).mul(x.log_2()));
}
You better ask such questions on https://ethereum.stackexchange.com