Ask Your Question
0

Can you help me with digits of pi? [closed]

asked 7 years ago

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I want to put the first n digits of pi into a list. I have tried numerical approximation but I was not able to figure out if it could help me .Neither did I find a function for it.

Preview: (hide)

Closed for the following reason question is off-topic or not relevant by veritas
close date 2017-12-01 12:53:56.238445

1 Answer

Sort by » oldest newest most voted
1

answered 7 years ago

vdelecroix gravatar image

At least there is the following workaround

sage: map(ZZ, pi.n(digits=20).str()[2:])
[1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 0]

If you want more digits, just increase 20 to something else.

Preview: (hide)
link

Question Tools

Stats

Asked: 7 years ago

Seen: 515 times

Last updated: Nov 14 '17