next up previous contents
Next: Solution Up: Procedures and Modules Previous: Solution

 

Complex Arithmetic - Modules

A complex number with solely integer components can be represented as a two element INTEGER array. Write a MODULE called Integer_Complex_Arithmetic which contains 4 FUNCTION s each accepting two integer complex number `operands' and delivering the result of addition, subtraction, multiplication and division. Where appropriate Fortran 90 integer division rules should be followed. The following rules for complex arithmetic may be useful,

displaymath3330

and,

displaymath3331

and,

displaymath3332

and,

displaymath3333

Also write a procedure to accept one integer complex number and one non-negative integral exponent which delivers the result of **.

Note, for tex2html_wrap_inline3340 ,

displaymath3334

Go back to Notes gif




next up previous contents
Next: Solution Up: Procedures and Modules Previous: Solution

©University of Liverpool, 1997
Thu May 29 10:11:26 BST 1997
Not for commercial use.