test_mean Subroutine

subroutine test_mean()

Arguments

None

Variables

Type Visibility Attributes Name Initial
double precision, public :: dp_mean
real, public :: sp_mean

Source Code

subroutine test_mean()
real :: sp_mean
double precision :: dp_mean
   call unit_check_start('mean',msg='')
   call mean([4.0, 36.0, 45.0, 50.0, 75.0], 5, 1, sp_mean)
   call unit_check('mean', sp_mean.eq.42.0, 'checking',sp_mean,42.0)
   call mean([4.0d0, 36.0d0, 45.0d0, 50.0d0, 75.0d0], 5, 1, dp_mean)
   call unit_check('mean', dp_mean.eq.42.0d0, 'checking',dp_mean,42.0d0)
   call mean([4.0d0], 1, 1, dp_mean)
   call unit_check('mean', dp_mean.eq.4.0d0, 'checking',dp_mean,4.0d0)
   call unit_check_done('mean',msg='')
end subroutine test_mean