program machar_prb ! !********************************************************************** ! !! MACHAR_PRB runs the MACHAR tests. ! implicit none ! call timestamp ( ) write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'MACHAR_PRB' write ( *, '(a)' ) ' Tests for the MACHAR machine ' write ( *, '(a)' ) ' characteristic routines.' call test01 call test02 write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'MACHAR_PRB' write ( *, '(a)' ) ' Normal end of execution.' stop end subroutine test01 ! !********************************************************************** ! ! TEST01 tests MACHAR_S. ! implicit none ! real eps real epsneg integer ibeta integer iexp integer irnd integer it integer machep integer maxexp integer minexp integer negep integer ngrd real xmax real xmin ! write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'TEST01' write ( *, '(a)' ) ' Test MACHAR_S, which computes single' write ( *, '(a)' ) ' precision machine constants.' call machar_s ( ibeta, it, irnd, ngrd, machep, negep, iexp, & minexp, maxexp, eps, epsneg, xmin, xmax ) write ( *, '(a)' ) ' ' write ( *, '(a,i5)' ) ' IBETA = ', ibeta write ( *, '(a,i5)' ) ' IT = ', it write ( *, '(a,i5)' ) ' IRND = ', irnd write ( *, '(a,i5)' ) ' NGRD = ', ngrd write ( *, '(a,i5)' ) ' MACHEP = ', machep write ( *, '(a,i5)' ) ' NEGEP = ', negep write ( *, '(a,i5)' ) ' IEXP = ', iexp write ( *, '(a,i5)' ) ' MINEXP = ', minexp write ( *, '(a,i5)' ) ' MAXEXP = ', maxexp write ( *, '(a,e25.13)' ) ' EPS = ', eps write ( *, '(a,e25.13)' ) ' EPSNEG = ', epsneg write ( *, '(a,e25.13)' ) ' XMIN = ', xmin write ( *, '(a,e25.13)' ) ' XMAX = ', xmax return end subroutine test02 ! !********************************************************************** ! ! TEST02 tests MACHAR_D. ! implicit none ! double precision eps double precision epsneg integer ibeta integer iexp integer irnd integer it integer machep integer maxexp integer minexp integer negep integer ngrd double precision xmax double precision xmin ! write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'TEST02' write ( *, '(a)' ) ' Test MACHAR_D, which computes double' write ( *, '(a)' ) ' precision machine constants.' call machar_d ( ibeta, it, irnd, ngrd, machep, negep, iexp, & minexp, maxexp, eps, epsneg, xmin, xmax ) write ( *, '(a)' ) ' ' write ( *, '(a,i5)' ) ' IBETA = ', ibeta write ( *, '(a,i5)' ) ' IT = ', it write ( *, '(a,i5)' ) ' IRND = ', irnd write ( *, '(a,i5)' ) ' NGRD = ', ngrd write ( *, '(a,i5)' ) ' MACHEP = ', machep write ( *, '(a,i5)' ) ' NEGEP = ', negep write ( *, '(a,i5)' ) ' IEXP = ', iexp write ( *, '(a,i5)' ) ' MINEXP = ', minexp write ( *, '(a,i5)' ) ' MAXEXP = ', maxexp write ( *, '(a,e25.13)' ) ' EPS = ', eps write ( *, '(a,e25.13)' ) ' EPSNEG = ', epsneg write ( *, '(a,e25.13)' ) ' XMIN = ', xmin write ( *, '(a,e25.13)' ) ' XMAX = ', xmax return end