Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
27
Task/Arithmetic-Complex/ALGOL-68/arithmetic-complex.alg
Normal file
27
Task/Arithmetic-Complex/ALGOL-68/arithmetic-complex.alg
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
main:(
|
||||
FORMAT compl fmt = $g(-7,5)"⊥"g(-7,5)$;
|
||||
|
||||
PROC compl operations = VOID: (
|
||||
LONG COMPL a = 1.0 ⊥ 1.0;
|
||||
LONG COMPL b = 3.14159 ⊥ 1.2;
|
||||
|
||||
LONG COMPL c;
|
||||
|
||||
printf(($x"a="f(compl fmt)l$,a));
|
||||
printf(($x"b="f(compl fmt)l$,b));
|
||||
|
||||
# addition #
|
||||
c := a + b;
|
||||
printf(($x"a+b="f(compl fmt)l$,c));
|
||||
# multiplication #
|
||||
c := a * b;
|
||||
printf(($x"a*b="f(compl fmt)l$,c));
|
||||
# inversion #
|
||||
c := 1.0 / a;
|
||||
printf(($x"1/c="f(compl fmt)l$,c));
|
||||
# negation #
|
||||
c := -a;
|
||||
printf(($x"-a="f(compl fmt)l$,c))
|
||||
);
|
||||
compl operations
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue