#Can anyone here answer this question pls ?
10 messages · Page 1 of 1 (latest)
No
Actually thinking about it, it'll be different in every base.
Are you asking how to compute the 1000th digit in other bases?
Thank you next
A hint
To find the exact value of the 1000th decimal of pi in any given base b other than base-10, you can use the decimal module in Python to represent pi to a high degree of accuracy and then convert it to the desired base. Here's an example code snippet that shows how to do this:
from decimal import Decimal
# Define the desired base
b = 2
# Set the precision for pi using the decimal module
precision = 1001
pi = Decimal(22).divmod(7)
pi = pi.quantize(Decimal('.' + '0'*(precision-1) + '1'))
# Convert pi to the desired base
pi_str = str(pi).split('.')
pi_int = int(pi_str[0])
pi_frac = pi_str[1]
pi_frac = [int(x) for x in str(pi_frac)]
result = ""
22/7 isn't Pi. It's an approximation of pi.
!exec ```py
import math
print(math.pi)
print(22/7)
@sly echo
✅ Exec - Success (Super User 🦸)
3.141592653589793
3.142857142857143
!exec modules | Completed in 0.5516 milliseconds