I have an issue creating a calculation based smart contract which performs some calculation based on some formula. Here is the function as bellows:
function financialReputation( ufixed xb , ufixed xs) returns (uint vb , ufixed vs) {
//uint128 exp = 2.718;
vb = - (1 / 2**(uint(xb / 5) )) +1;
vs = - (1 / ufixed(2.7182818285)**(ufixed(xs / 2000)) ) +1;
// xi = (1 / (1+ 2**(- 0.005 * xi - 4) ) )** 50;
return (vb,vs);
}
Error will be as :
TypeError: Operator ** not compatible with types ufixed128x18 and
ufixed128x18
vs = - (1 / ufixed(2.7182818285)**(ufixed(xs / 2000)) ) +1;
^---------------------------------------^
Please help me how i can convert ufixed to a compatibal type for exponent operator(**). Any suggestion or recommendation will be requested.