How to resolve the algorithm Arithmetic-geometric mean step by step in the МК-61/52 programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Arithmetic-geometric mean step by step in the МК-61/52 programming language

Table of Contents

Problem Statement

Write a function to compute the arithmetic-geometric mean of two numbers.

The arithmetic-geometric mean of two numbers can be (usefully) denoted as

a g m

( a , g )

{\displaystyle \mathrm {agm} (a,g)}

, and is equal to the limit of the sequence: Since the limit of

a

n

g

n

{\displaystyle a_{n}-g_{n}}

tends (rapidly) to zero with iterations, this is an efficient method. Demonstrate the function by calculating:

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Arithmetic-geometric mean step by step in the МК-61/52 programming language

Source code in the мк-61/52 programming language

П1	<->	П0	1	ВП	8	/-/	П2	ИП0	ИП1
-	ИП2	-	/-/	x<0	31	ИП1	П3	ИП0	ИП1
*	КвКор	П1	ИП0	ИП3	+	2	/	П0	БП
08	ИП0	С/П


  

You may also check:How to resolve the algorithm Pangram checker step by step in the MATLAB programming language
You may also check:How to resolve the algorithm Loops/For step by step in the GW-BASIC programming language
You may also check:How to resolve the algorithm Cartesian product of two or more lists step by step in the ALGOL 68 programming language
You may also check:How to resolve the algorithm Check that file exists step by step in the Objective-C programming language
You may also check:How to resolve the algorithm Classes step by step in the Rust programming language