Closed djrtwo closed 5 years ago
Spec now uses int_sqrt instead of floating point sqrt and then an integer cast.
int_sqrt
def int_sqrt(n): x = n y = (x + 1) // 2 while y < x: x = y y = (x + n // x) // 2 return x
int(sqrt())
taking care of this
Linking to the two relevant PRs in the spec repo https://github.com/ethereum/eth2.0-specs/pull/13 https://github.com/ethereum/eth2.0-specs/pull/14
Issue
Spec now uses
int_sqrt
instead of floating point sqrt and then an integer cast.Proposed Implementation
int_sqrt
in helpersint(sqrt())
in rewards calculations withint_sqrt