Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/Arithmetic-Complex/PL-I/arithmetic-complex.pli
Normal file
21
Task/Arithmetic-Complex/PL-I/arithmetic-complex.pli
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* PL/I complex numbers may be integer or floating-point. */
|
||||
/* In this example, the variables are floating-pint. */
|
||||
/* For integer variables, change 'float' to 'fixed binary' */
|
||||
|
||||
declare (a, b) complex float;
|
||||
a = 2+5i;
|
||||
b = 7-6i;
|
||||
|
||||
put skip list (a+b);
|
||||
put skip list (a - b);
|
||||
put skip list (a*b);
|
||||
put skip list (a/b);
|
||||
put skip list (a**b);
|
||||
put skip list (1/a);
|
||||
put skip list (conjg(a)); /* gives the conjugate of 'a'. */
|
||||
|
||||
/* Functions exist for extracting the real and imaginary parts */
|
||||
/* of a complex number. */
|
||||
|
||||
/* As well, trigonometric functions may be used with complex */
|
||||
/* numbers, such as SIN, COS, TAN, ATAN, and so on. */
|
||||
Loading…
Add table
Add a link
Reference in a new issue