# Category : Miscellaneous Language Source Code

Archive : FORTRN77.ZIP

Filename : CXARTH.FOR

C

C THIS SUBROUTINE CXARTH DOES COMPLEX ARITHMETIC INVOLVING

C TWO COMPLEX NUMBERS.

C

C N=1 FOR ADDITION

C N=2 FOR SUBTRACTION

C N=3 FOR MULTIPLICATION

C N=4 FOR DIVISION

C

DIMENSION A(2), B(2), C(2)

X = B(1)

Y = A(1)

GO TO (1,2,3,4),N

1 C(1) = X + Y

C(2) = A(2) + B(2)

RETURN

2 C(1) = Y - X

C(2) = A(2) - B(2)

RETURN

3 C(1) = Y*X - A(2)*B(2)

C(2) = A(2)*X + Y*B(2)

RETURN

4 G = X*X + B(2)*B(2)

C(1) = (Y*X + A(2)*B(2))/G

C(2) = (A(2)*X - Y*B(2))/G

RETURN

END

Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/