Ask Your Question
0

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

asked 2017-11-13 20:22:11 +0100

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.

edit retag flag offensive reopen merge delete

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 2017-11-14 11:14:12 +0100

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.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2017-11-13 20:22:11 +0100

Seen: 496 times

Last updated: Nov 14 '17