DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
pi = Atn(1) * 4
f1 = 1: f2 = 1: f3 = f1 + f2
For k = 1 To 100
term = Atn(1 / f3)
tot = tot + term
Text1.Text = Text1.Text & k & " " & tot & " " & tot * 180 / pi & crlf
DoEvents
f1 = f2: f2 = f3: f3 = f1 + f2
f1 = f2: f2 = f3: f3 = f1 + f2
Next k
Text1.Text = Text1.Text & crlf & " done"
End Sub
finds
k sum sum * 180/pi
1 0.463647609000806 26.565051177078
2 0.661043168850687 37.8749836510982
3 0.737815060120465 42.2736890060937
4 0.76721834832447 43.95837332399
5 0.778453830582433 44.6021190381654
6 0.782745649724444 44.8480221614361
7 0.78438499251819 44.9419495846929
8 0.785011166512743 44.9778267118217
9 0.78525034373851 44.9915305574138
10 0.785341701311799 44.9967649607898
11 0.785376596799798 44.9987643249762
12 0.785389925690167 44.9995280141399
13 0.785395016873256 44.9998197174437
14 0.785396961532153 44.9999311381911
15 0.785397704325756 44.9999736971295
16 0.785397988047665 44.9999899531975
17 0.785398096419791 44.9999961624629
18 0.78539813781426 44.9999985341913
19 0.78539815362554 44.9999994401109
20 0.785398159664911 44.9999997861414
21 0.785398161971746 44.9999999183133
22 0.785398162852879 44.9999999687985
23 0.785398163189441 44.9999999880821
24 0.785398163317997 44.9999999954478
25 0.785398163367101 44.9999999982612
26 0.785398163385857 44.9999999993358
27 0.785398163393021 44.9999999997463
28 0.785398163395757 44.9999999999031
29 0.785398163396802 44.999999999963
30 0.785398163397202 44.9999999999859
31 0.785398163397354 44.9999999999946
32 0.785398163397413 44.999999999998
33 0.785398163397435 44.9999999999992
34 0.785398163397443 44.9999999999997
35 0.785398163397447 44.9999999999999
36 0.785398163397448 45
37 0.785398163397448 45
38 0.785398163397448 45
39 0.785398163397449 45
40 0.785398163397449 45
41 0.785398163397449 45
42 0.785398163397449 45
43 0.785398163397449 45
44 0.785398163397449 45
45 0.785398163397449 45
46 0.785398163397449 45
47 0.785398163397449 45
48 0.785398163397449 45
49 0.785398163397449 45
50 0.785398163397449 45
51 0.785398163397449 45
52 0.785398163397449 45
53 0.785398163397449 45
54 0.785398163397449 45
55 0.785398163397449 45
56 0.785398163397449 45
57 0.785398163397449 45
58 0.785398163397449 45
59 0.785398163397449 45
60 0.785398163397449 45
61 0.785398163397449 45
62 0.785398163397449 45
63 0.785398163397449 45
64 0.785398163397449 45
65 0.785398163397449 45
66 0.785398163397449 45
67 0.785398163397449 45
68 0.785398163397449 45
69 0.785398163397449 45
70 0.785398163397449 45
71 0.785398163397449 45
72 0.785398163397449 45
73 0.785398163397449 45
74 0.785398163397449 45
75 0.785398163397449 45
76 0.785398163397449 45
77 0.785398163397449 45
78 0.785398163397449 45
79 0.785398163397449 45
80 0.785398163397449 45
81 0.785398163397449 45
82 0.785398163397449 45
83 0.785398163397449 45
84 0.785398163397449 45
85 0.785398163397449 45
86 0.785398163397449 45
87 0.785398163397449 45
88 0.785398163397449 45
89 0.785398163397449 45
90 0.785398163397449 45
91 0.785398163397449 45
92 0.785398163397449 45
93 0.785398163397449 45
94 0.785398163397449 45
95 0.785398163397449 45
96 0.785398163397449 45
97 0.785398163397449 45
98 0.785398163397449 45
99 0.785398163397449 45
100 0.785398163397449 45
So the sum approaches pi/4, as, treated as radians and converted to degrees, it comes out to 45°.
Edited on May 11, 2016, 10:22 am
|
Posted by Charlie
on 2016-05-11 10:19:23 |