Message Boards Message Boards

0
|
361 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Digit-generating program for the MRB constant

We will call a program that uses spigot algorithm to compute a number a spigot program. As pointed out below, the following is not one in the computational sense. But I considered using cloud functions do so, as "generating digits selectively,"

According to the Wolfram Notebook Assistant,

A spigot algorithm is a type of algorithm used to generate the digits of a number sequentially, one at a time, in a "streaming" fashion. This kind of algorithm is particularly useful for generating digits of irrational numbers, such as [Pi] (pi) or e, where the digits can be produced indefinitely without needing to compute the entire number first.

The term "spigot" is analogous to a faucet or tap, where the digits of the number "drip out" one by one. Spigot algorithms are designed to be efficient in terms of both time and space, often requiring only a fixed amount of memory to produce each digit.

One of the key characteristics of spigot algorithms is that they are designed to generate each digit in a fixed amount of time, regardless of how many digits have already been produced. This makes them particularly useful for applications where you need a large number of digits but don't want to store the entire number in memory.

Examples of spigot algorithms include those used for generating the digits of [Pi], such as the Bailey[Dash]Borwein[Dash]Plouffe (BBP) formula, which allows the calculation of the nth digit of [Pi] in base 16 without needing to calculate the preceding digits.

Here is one that computes and verifies up to the 10,000th digit, of your inputting, of the MRB constant. It takes great advantage of the Wolfram library.

Here I inputted 2048:

Can you write one for another number?

2 Replies

Daniel, I'll look at remaining it. Thaks for the correction.

It appears that this algorithm generates all prior digits and uses NthDigit to select the desired one. If that is in fact the case then it is not a spigot algorithm. (It might be fine in other respects but that's a different matter.)

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract