A
A
Alexey2020-11-05 13:51:02
C++ / C#
Alexey, 2020-11-05 13:51:02

How to complete this task?

Problem 6.3 Write a program to solve the following problem: Using
the expansion formula, calculate the value of the number π with a given accuracy d = 0.001. as a
reference, use the value Pi = 3.14159. Calculations are carried out until the difference between the reference and calculated value of π modulo becomes less than the specified accuracy.
5fa3d8f510abf004744446.jpeg- decomposition formula.
I don't understand how to solve this at all.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Adamos, 2020-11-05
@Adamos

Calculate the expression in brackets for a finite number N, get the result of the entire formula.
Calculate the result for N + 1. Compare with the previous one, make sure they match up to the third decimal place. If not, keep increasing N until the condition is met.
It will take a couple of cycles and a little math.

S
Saboteur, 2020-11-05
@saboteur_kiev

You make a loop in which you get a number, add it to the previous calculated one, round up to x.xxx and compare with Pi rounded up to x.xxx
If it matches, you stop the loop.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question