Enter X and use the formula e ^ x = 1 + X + x ^ 2 / 2! + x ^ 3 / 3! + Find the approximate value of e ^ x until the absolute value of the last term is less than - 10 ^ - 6 Using VB (Microsoft Visual Studio 2005) as the software

Enter X and use the formula e ^ x = 1 + X + x ^ 2 / 2! + x ^ 3 / 3! + Find the approximate value of e ^ x until the absolute value of the last term is less than - 10 ^ - 6 Using VB (Microsoft Visual Studio 2005) as the software


Dim a As Long, s As Long, D As String, e As Long, b As Long
D = 1: a = 1: s = 1
Do Until e > 6
D = ((2 * a) / (2 * a + 1)) * ((2 * a) / (2 * a - 1))
s = s * D
a = a + 1
b = 2 * s
e = Len(b) - InStr(b, ".")
Debug.Print D
DoEvents
Loop
Print b



Approximate value of LN 11 by differential


Using differential thinking