test cbrt func
This commit is contained in:
parent
4f11c0e36a
commit
c16269f4e8
@ -1,17 +1,11 @@
|
|||||||
program essai
|
program essai
|
||||||
|
|
||||||
use bloubspace
|
! use bloubspace
|
||||||
use mathstuff
|
use mathstuff
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
type(t_boundingbox) :: bbox
|
|
||||||
|
|
||||||
call load_boundingbox("WS/boundinboxes.dat", bbox, "cube ")
|
call test_random(10)
|
||||||
|
|
||||||
print *, bbox
|
|
||||||
|
|
||||||
|
|
||||||
! call test_random(20)
|
|
||||||
|
|
||||||
|
|
||||||
STOP ': BECAUSE JOB IS DONE'
|
STOP ': BECAUSE JOB IS DONE'
|
||||||
@ -21,17 +15,17 @@ program essai
|
|||||||
|
|
||||||
subroutine test_random(nbre)
|
subroutine test_random(nbre)
|
||||||
integer, intent(in) :: nbre
|
integer, intent(in) :: nbre
|
||||||
integer :: foo, bar
|
integer :: foo
|
||||||
real :: quux
|
real :: quux, bar
|
||||||
double precision :: somme
|
double precision :: somme
|
||||||
|
|
||||||
call init_random_seed() ! in module 'mathstuff'
|
call init_random_seed() ! in module 'mathstuff'
|
||||||
somme = 0.0
|
somme = 0.0
|
||||||
do foo=1, nbre
|
do foo=1, nbre
|
||||||
quux = rand()
|
quux = 10.0 * rand()
|
||||||
somme = somme + quux
|
somme = somme + quux
|
||||||
bar = mod(irand(), 7)
|
bar = quux ** (.1/.3)
|
||||||
print *, foo, quux, somme/foo, bar
|
print *, quux, bar, somme/foo
|
||||||
enddo
|
enddo
|
||||||
end subroutine test_random
|
end subroutine test_random
|
||||||
! --------------------------------------------------------------
|
! --------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user