I decided to revisit the
problem of computing digits of e
after talking to someone who thought that a spigot algorithm would work without
a loss of precision. I felt pretty embarrassed when it took about 30 seconds to
find some
code that did exactly what I wanted it to.
It took only a few minutes to convert the algorithm from Javascript into C, it
works great!
Then after consulting some documentation to look up the finer points of Bash
syntax, I rewrote it:
It’s amazing how these problems can initially seem so difficult, but once the
correct approach to the problem is found, the solution is actually quite
simple.