mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-11 19:24:15 +00:00
[integer-sqrt] add comment to credit 'newton's method'
This commit is contained in:
parent
82ec8dfdc2
commit
ec1eee4133
@ -302,6 +302,7 @@ Finally, we define `integer_sqrt` for use in reward/penalty calculations:
|
||||
|
||||
```python
|
||||
def integer_sqrt(n):
|
||||
# Utilizes "Newton's Method"
|
||||
x = n
|
||||
y = (x + 1) // 2
|
||||
while y < x:
|
||||
|
Loading…
x
Reference in New Issue
Block a user