[VA] SRC#002- Almost integers and other beasties
|
01-03-2019, 06:29 AM
Post: #15
|
|||
|
|||
RE: [VA] SRC#002- Almost integers and other beasties
.
Hi, Gerson: (01-02-2019 11:45 PM)Gerson W. Barbosa Wrote: 640000*x^5-768000*φ^2*x^4+3000+ln(2)=0 I only have an iPad at hand right now so running this extremely quick'n'dirty Newton on it produces the intended root of your polynomial, namely: 10 def fnf(x)=640000*x^5-768000*p^2*x^4+3000+log(2) 20 def fnd(x)=(fnf(x+0.0001)-fnf(x-0.0001))/0.0002 30 p=(1+sqr(5))/2:input x0:home 35 for i=1 to 15 40 x1=x0-fnf(x0)/fnd(x0) 50 print x1;" ";fnf(x1) 60 x0=x1 70 next i Run ?10 8.167851990851785 14317006965.841368 6.715802401810718 4653139559.305097 5.573461555087618 1501801189.590903 4.687642795302511 477761112.5232644 4.021032838991736 147136983.11165047 3.551962197641171 41803117.36241603 3.2712995361031516 9506051.502593396 3.1593486482128053 1132110.8530623894 3.141983056899174 24349.060661761047 3.141592847539331 12.090443311217141 3.1415926535896097 0.0000030975368739971643 3.14159265358956 -3.170697671084355e-8 3.1415926535895604 -1.904654323148236e-9 3.1415926535895604 -1.904654323148236e-9 3.1415926535895604 -1.904654323148236e-9 which is a nice approximation to Pi, congrats and thanks for sharing. Perhaps it's even more accurate than what the iPad produces but right now I can't tell ... Regards. V . All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)