[VA] SRC#006- Pi Day 2020 Special: A New Fast Way to Compute Pi
|
03-15-2020, 03:21 PM
(This post was last modified: 03-15-2020 03:24 PM by J-F Garnier.)
Post: #9
|
|||
|
|||
RE: [VA] SRC#006- Pi Day 2020 Special: A New Fast Way to Compute Pi
(03-15-2020 02:42 PM)Albert Chan Wrote: Below use multiple angle formula (4 times), \(\sin(5x) = 16 \sin^5 x - 20 \sin^3 x + 5 \sin x \) Nice and compact solution ! I needed to calculate 11 terms in the form u(n)=x^(2n+1)/(2n+1)! each can be computed from the previous one by u(n) = u(n-1) * (x^2) / (2n*(2n+1)) that is 2 multiplications plus one division (I didn't optimized the factorial in my proposed solution). Total 33 mult/division operations. Your solution needs 5 multiplications for FNM(X), called 4 times, plus the 4 multiplications and some divisions in FNT(X). J-F |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)