I'm trying to make some advanced calculations in Solidity. I was able to successfully implement the algorithm on my contract, but its results are way below zero, and whenever I try to get it with Javascript, it justs rounds down to 0. Is there any way I can multiply a fraction stored in a variable by a really big number so I can get some precision here? Example:
uint256 x = uint256(5)/uint256(10);
and then:
x *= 100;
resulting in:
> x = 50 <
And here is some of the code I implemented:
Thanks.
