Calculate pi to an arbitrary number of decimal places

bc -l <<< "scale=1000; 4*a(1)"

2020-03-11 15:58:21

1 Alternatives + Submit Alt

  • Change the scale to adjust number of decimal places prefix the command with "time" to benchmark the computer (compare how long it takes to calculate 10000 digits of pi on various computers). Show Sample Output

    echo "scale=1000; 4*a(1)" | bc -l
    regulatre · 2014-07-31 19:13:26 0

What Others Think

Thanks, I'll do that everyday from now on
pascalv · 43 weeks and 6 days ago
pascalv · 43 weeks and 6 days ago
When you choose the competition, you may not be getting the newest and latest episodes and movies. Have you ever heard of a brand new film that just came out, went to a free movie site, and found it unavailable? This happens quite frequently with our competition. They just don’t have the time or energy to keep up with the newest shows on the airwave1123movies unblock. they just go for Unlike them, we keep our catalog updated regularly, so you always have access to the latest TV shows and movies.
leqeen · 43 weeks and 4 days ago
Calculator all-time help me in my exams special in math subject we all depend on this. I used an online calculator you want to join then Click
Elie77 · 31 weeks ago
This is a good guide to get an idea about Calculate pi to an arbitrary number of decimal places. They have very well explained the procedure that helps to get a clear idea about the topic. Thanks a lot for sharing this roofing contractors
Juvanta · 15 weeks and 4 days ago
great content! will recommend this site to my friends breast implants wichita
looneyhans · 13 weeks ago
I am so happy to read this topic you have shared here. You gave a valuable information about the Calculate pi to an arbitrary number of decimal places. I like your post, and it will be helpful for the programming students. Thanks for providing the information.">clipping path service
ryanbabraham · 11 weeks and 3 days ago
any other alternatives?
looneyhans · 8 weeks and 3 days ago
This is such a great help! laser hair removal I've been struggling for days already, soo glad i found this site! thanks for sharing!
idasanka · 3 weeks and 5 days ago
gosh! what a great site! ive been having difficulties understanding this before.. laser hair removal thanks for sharing this!
idasanka · 3 weeks and 5 days ago
cleaning services cedar rapids Welp! I see anothere genius here!
yeoyeo · 2 weeks and 1 day ago
became a searcher,wanting to discover who i was and what made me precise. my view of myself turned into changing. i desired a stable base to start from. i commenced to resist3 stress to behave in ways that i didn’t like any greater,and i used to be delighted by who i in reality become. i got here to feel a good deal extra sure that no one can ever take my region. virtual phone every of us holds a completely unique area within the international. you are unique,irrespective of what others say or what you may think. so forget about approximately being replaced. you may’t be.
postscll15 · 4 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: