1. 18

  2. 2

    I wonder if this could have been done using a giant dc program in order to avoid multiple invocations of bc?

    1. 2

      Hilarious. A few years back I would do something similar. I calculated the constant e to several decimal places by using a Taylor series and making my own rational “type” in bash represented by 2 integers.

      With some liberal use of euclidean algo to reduce the fractions you can keep the denominator from exploding.

      Which just leaves printing the final result at the end. That was fun.

      1. 1

        MJD post - upvote.

        1. 1

          Agreed. He is always worth reading.