3 c Test Bessel function intrinsics.
4 c These functions are only available if provided by system
6 c David Billinghurst <David.Billinghurst@riotinto.com>
9 double precision dx, da
16 c ERF - error function
19 call c_r(ERF(x),a,'ERF(real)')
20 call c_d(ERF(dx),da,'ERF(double)')
21 call c_d(DERF(dx),da,'DERF(double)')
23 c ERFC - complementary error function
26 call c_r(ERFC(x),a,'ERFC(real)')
27 call c_d(ERFC(dx),da,'ERFC(double)')
28 call c_d(DERFC(dx),da,'DERFC(double)')
30 if ( fail ) call abort()
33 subroutine failure(label)
34 c Report failure and set flag
38 write(6,'(a,a,a)') 'Test ',label,' FAILED'
42 subroutine c_r(a,b,label)
43 c Check if REAL a equals b, and fail otherwise
46 if ( abs(a-b) .gt. 1.0e-5 ) then
48 write(6,*) 'Got ',a,' expected ', b
52 subroutine c_d(a,b,label)
53 c Check if DOUBLE PRECISION a equals b, and fail otherwise
56 if ( abs(a-b) .gt. 1.0d-5 ) then
58 write(6,*) 'Got ',a,' expected ', b