Can any finite bit string be found in pi within a reasonable amount of time? [closed]

Expanding on my comments. There’s a very important concept here that’s called information entropy. Out of full disclosure, I’m the current world record holder of the digits of Pi at 10 trillion digits (10^13). I have approximately 10,000 copies of everyone’s social security number. However that doesn’t mean I can just hack into everyone’s accounts … Read more

Why do I get “OverflowError: (34, ‘Result too large’)” or “OverflowError: (34, ‘Numerical result out of range’)” from floating-point exponentiation?

Python floats are neither arbitary precision nor of unlimited size. When k = 349, 16.**k is much too large – that’s almost 2^1400. Fortunately, the decimal library allows arbitrary precision and can handle the size: import decimal decimal.getcontext().prec = 100 def pi(): pi = decimal.Decimal(0) for k in range(350): pi += (decimal.Decimal(4)/(decimal.Decimal(8)*decimal.Decimal(k+1))…)

How is pi (π) calculated?

In calculus there is a thing called Taylor Series which provides an easy way to calculate many irrational values to arbitrary precision. Pi/4 = 1 – 1/3 + 1/5 – 1/7 + … (from http://www.math.hmc.edu/funfacts/ffiles/30001.1-3.shtml ) Keep adding those terms until the number of digits of precision you want stabilize. Taylor’s theorem is a powerful … Read more

How to printf long long

%lld is the standard C99 way, but that doesn’t work on the compiler that I’m using (mingw32-gcc v4.6.0). The way to do it on this compiler is: %I64d So try this: if(e%n==0)printf(“%15I64d -> %1.16I64d\n”,e, 4*pi); and scanf(“%I64d”, &n); The only way I know of for doing this in a completely portable way is to use … Read more

Why does Python’s hash of infinity have the digits of π?

Summary: It’s not a coincidence; _PyHASH_INF is hardcoded as 314159 in the default CPython implementation of Python, and was picked as an arbitrary value (obviously from the digits of π) by Tim Peters in 2000. The value of hash(float(‘inf’)) is one of the system-dependent parameters of the built-in hash function for numeric types, and is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)