|
|
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
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.