How to resolve the algorithm Calculating the value of e step by step in the 360 Assembly programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Calculating the value of e step by step in the 360 Assembly programming language
Table of Contents
Problem Statement
Calculate the value of e.
(e is also known as Euler's number and Napier's constant.)
See details: Calculating the value of e
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Calculating the value of e step by step in the 360 Assembly programming language
Source code in the 360 programming language
* Calculating the value of e - 21/07/2018
CALCE PROLOG
LE F0,=E'0'
STE F0,EOLD eold=0
LE F2,=E'1' e=1
LER F4,F2 xi=1
LER F6,F2 facti=1
BWHILE CE F2,EOLD while e<>eold
BE EWHILE ~
STE F2,EOLD eold=e
LE F0,=E'1' 1
DER F0,F6 1/facti
AER F2,F0 e=e+1/facti
AE F4,=E'1' xi=xi+1
MER F6,F4 facti=facti*xi
LER F0,F4 xi
B BWHILE end while
EWHILE LER F0,F2 e
LA R0,5 number of decimals
BAL R14,FORMATF format a float number
MVC PG(13),0(R1) output e
XPRNT PG,L'PG print e
EPILOG
COPY FORMATF format a float number
EOLD DS E eold
PG DC CL80' ' buffer
REGEQU
END CALCE
You may also check:How to resolve the algorithm Five weekends step by step in the FreeBASIC programming language
You may also check:How to resolve the algorithm Cantor set step by step in the Groovy programming language
You may also check:How to resolve the algorithm Playfair cipher step by step in the APL programming language
You may also check:How to resolve the algorithm Bell numbers step by step in the zkl programming language
You may also check:How to resolve the algorithm Square but not cube step by step in the AppleScript programming language