You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following fails with RealMath.fromReal(hundred) being 99. And in fact the result is always off by int(1) (i.e. 4000 * 2/40 = 199).
function testRealMath() public {
var exp = RealMath.div(RealMath.toReal(1), RealMath.toReal(40));
var hundred = RealMath.mul(exp, RealMath.toReal(4000));
Assert.equal(RealMath.fromReal(hundred), 100, "Should equal 100");
}