I have a question
Natural Logarithm The natural logarithm is a function that has many scientific applications and often shows up on your calculator as the button . For this lab, we will focus simply on computing In(2), which is ~0.69. One way to compute In(2) is to compute the following infinite series: 1-12+ 1/3-/4+ /s.". Obviously, you and your computer don't have infinite time, so instead we will find an approximation by evaluating just the first n terms of the series. 1. Write several methods that will compute the sum of the first n terms of the series in the specific manners outlined below. (Let n = 100,000 and if you have time, try a million terms.) a) Sum the series forwards (first term first), using type double variables and literals. b) Sum the series backwards (last term first), using type double variables and literals. c) Sum the series forwards in two halves, computing the positive and negative terms separately, using type double variables and literals. d) Sum the series backwards in two halves, computing the positive and negative terms separately, using type double variables and literals. e) Sum the series forwards (first term first), using type float variables and literals. f) Sum the series backwards (last term first), using type float variables and literals. 2. Display the results from each of these methods in a table-like format, clearly labeling your output. Use 15 decimal places in your output. In a separate paragraph speculate about which result you consider the most accurate (including your calculator), and what accounts for any discrepancies, if there are any. You may also want to compare your result against the math library method log(). Hints Use constants in your program where you can. . Make sure you document your programs properly, including name, student number, purpose, etc. When you write the literal value 3.1415 Java assumes the data type is double. When you write 3.1415f you force the data type of the literal to be a float. The suffix 'f is important when you need a literal to be a float type. I would expect the signature of each method to be of the following form: private static float sumForwards (int numberOfTerms) {...} This one satisfies 1e from above; each of the other methods will be similar