2019-04-09 22:24:40 +00:00
|
|
|
pragma solidity ^0.5.2;
|
2019-04-09 20:54:21 +00:00
|
|
|
import "./BancorFormula.sol";
|
|
|
|
|
2019-04-09 18:58:02 +00:00
|
|
|
|
|
|
|
contract TestBancorFormula is BancorFormula {
|
|
|
|
|
2019-04-09 20:54:21 +00:00
|
|
|
function powerTest(
|
|
|
|
uint256 _baseN,
|
|
|
|
uint256 _baseD,
|
|
|
|
uint32 _expN,
|
|
|
|
uint32 _expD)
|
|
|
|
external view returns (uint256, uint8)
|
|
|
|
{
|
|
|
|
return super.power(
|
|
|
|
_baseN,
|
|
|
|
_baseD,
|
|
|
|
_expN,
|
|
|
|
_expD);
|
2019-04-09 18:58:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function generalLogTest(uint256 x) external pure returns (uint256) {
|
|
|
|
return super.generalLog(x);
|
|
|
|
}
|
|
|
|
|
|
|
|
function floorLog2Test(uint256 _n) external pure returns (uint8) {
|
|
|
|
return super.floorLog2(_n);
|
|
|
|
}
|
|
|
|
|
|
|
|
function findPositionInMaxExpArrayTest(uint256 _x) external view returns (uint8) {
|
|
|
|
return super.findPositionInMaxExpArray(_x);
|
|
|
|
}
|
|
|
|
|
|
|
|
function generalExpTest(uint256 _x, uint8 _precision) external pure returns (uint256) {
|
|
|
|
return super.generalExp(_x, _precision);
|
|
|
|
}
|
|
|
|
|
|
|
|
function optimalLogTest(uint256 x) external pure returns (uint256) {
|
|
|
|
return super.optimalLog(x);
|
|
|
|
}
|
|
|
|
|
|
|
|
function optimalExpTest(uint256 x) external pure returns (uint256) {
|
|
|
|
return super.optimalExp(x);
|
|
|
|
}
|
|
|
|
}
|