I tried some spigot formulas to calculate custom hexadecimal PI digits.

But any formula I tried definitely needed iterating and calculating sum from i=0 to N to get N-th digit.

How to get N-th hex digit without calculating previous digits?

  • 3
    $\begingroup$ Bailey–Borwein–Plouffe formula: en.wikipedia.org/wiki/… $\endgroup$ – Amzoti Jan 2 '14 at 0:14
  • 4
    $\begingroup$ Note that, using BBP, the amount of effort to calculate the millionth hex digit is still much more than the effort needed to calculate the tenth. It's just nowhere near the effort needed to calculate all million digits. There's no free lunch. $\endgroup$ – Will Jagy Jan 2 '14 at 0:25
  • $\begingroup$ BBP needs modular expanentation that is needs same precision calculation itself, right? $\endgroup$ – Sergei Oct 16 '15 at 16:32

Unfortunately (and this REALY was a HUGE let-down for me too when I discovered this), there aren't any currently known algorithms that can completely 'jump' to any digit, and if one was discovered, you can bet it would be popular and make it onto the news. But, I have a solution to your problem, it is an alternative to calculating that allows you to jump to any digit under 12.1 trillion.

  1. Download as much as you can from here.
  2. Optionally get an archiver such as 7zip (it will REALLY speed things up)
  3. Unpack the zip archives you downloaded into useable pi digits.
  4. Program a quick program to clear away the extra stuff in the files of pi, join the files of pi together, and convert them to hex.
  5. Create a program to get the nth byte in the files (i.e the nth pi digit).
  6. Your done, and ready to go!

Source(s): enter link description here

Anothe thing to check out: Distributed calculation of π


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.