File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / usr.bin / f77 / f77pass1 / tst / t17.f
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:26:07 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v121, HEAD
Power 6/32 Unix version 1.21

c	subroutine tst17
	parameter(ntest=17)
c	Complex arithmetic

	parameter(eps = 2.0e-7)
c	common /t17/c1,c2,c3
	complex c1,c2,c3
	c1 = cmplx(3.0,4.0)
	c2 = cmplx(-2.0,1.0)
	c3 = cmplx(1.0,-2.0)
	if( abs(real(c1)-3.0) .gt. eps) call e(1,ntest)
	if( abs(imag(c1)-4.0) .gt. eps) call e(2,ntest)
	if( abs(cabs(c1)-5.0) .gt. eps) call e(3,ntest)
	if( cabs(conjg(c2)-cmplx(-2.0,-1.0)) .gt. eps) call e(4,ntest)
	if( cabs(c1+c2-cmplx(1.0,5.0)) .gt. eps) call e(5,ntest)
	if( cabs(c2*c3-cmplx(0.0,5.0)) .gt. eps) call e(6,ntest)
	if( cabs(c3/c1-cmplx(-0.2,-0.4)) .gt. eps) call e(6,ntest)
	end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.