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
In book you use lower price 4545$, so sqrt from P * 2 * * 96 will be 5341294542274603406682713227264 (in book it is 5314786713428871004159001755648)
import math
q96 = 2**96
def price_to_sqrtp(p):
return int(math.sqrt(p) * q96)
print (price_to_sqrtp(4545))
5341294542274603406682713227264
I don't know, mb error in define lower price. If you want assign it to 4500, then it will be correct.
import math
q96 = 2**96
def price_to_sqrtp(p):
return int(math.sqrt(p) * q96)
print (price_to_sqrtp(4500))
5314786713428871004159001755648
The text was updated successfully, but these errors were encountered:
In book you use lower price 4545$, so sqrt from P * 2 * * 96 will be 5341294542274603406682713227264 (in book it is 5314786713428871004159001755648)
import math
q96 = 2**96
def price_to_sqrtp(p):
return int(math.sqrt(p) * q96)
print (price_to_sqrtp(4545))
I don't know, mb error in define lower price. If you want assign it to 4500, then it will be correct.
import math
q96 = 2**96
def price_to_sqrtp(p):
return int(math.sqrt(p) * q96)
print (price_to_sqrtp(4500))
The text was updated successfully, but these errors were encountered: