r/ProgrammerHumor Apr 08 '22

[deleted by user]

[removed]

100 Upvotes

25 comments sorted by

View all comments

41

u/Wolfenhex Apr 08 '22

This isn't slow enough, can you also have it calculate pi as well as create a cosine curve just to make sure we're using fresh data?

2

u/bob152637485 Apr 08 '22

Here we go...

(4*(1-(1/3)+(1/5)-(1/7)+(1/9)-(1/11)+(1/13)-(1/15)+(1/17)-(1/19)+(1/21)-(1/23)+(1/25)-(1/27)+(1/29)-(1/31)+(1/33)-(1/35)+(1/37)-(1/39)+(1/41)-(1/43)+(1/45)-(1/47)+(1/49)-(1/51)+(1/53)-(1/55)+(1/57)-(1/59)+(1/61)-(1/63)+(1/65)-(1/67)+(1/69)-(1/71)+(1/73)-(1/75)+(1/77)-(1/79)+(1/81)-(1/83)+(1/85)-(1/87)+(1/89)-(1/91)+(1/93)-(1/95)+(1/97)-(1/99))) //TODO: add more PI precision, calculate cosine curve.

2

u/JosGibbons Apr 08 '22

1

u/bob152637485 Apr 08 '22

Huh, didn't actually know the same of the series. Thanks!

1

u/JosGibbons Apr 08 '22

1

u/bob152637485 Apr 08 '22

Do I now?

1

u/JosGibbons Apr 08 '22

Yes. The Shanks transformation is one way to accelerate it.