The arctangent of 1 equals pi/4 so 4*arctan(1) gives us pi. Let's use the bc command to calculate pi to 1000 digits. We control this with the BC_LINE_LENGTH environment variable. For ePub documents we want to let the eReader reflow the long line so we increase BC_LINE_LENTH beyond 1000 to avoid the backslash character:
The backslash is handy for printing output, otherwise the unfolded output continues off the page to the right and ends on Issaquah-Hobart Road. Otherwise we can remove the backslash characters as follows:
The above code replaces the \ with a space and deletes the \n end-of-line character so it still wraps. To get rid of even the space this code suffices: