program test_xoroshiro128plus use m_xoroshiro128plus implicit none integer :: i type(rng_t) :: rng call rng%seed((/1337_i8, 31337_i8/)) ! Print a few integers print *,"Some integers: " do i=1,10 print *, rng%next() end do ! Re-seed so that the doubles and floats ! will be able to print out the same values. call rng%seed((/1337_i8, 31337_i8/)) ! And now a few doubles print *,"Some double precision floats: " do i=1,10 print *, rng%U01() end do ! Again re-seed and print the floats. call rng%seed((/1337_i8, 31337_i8/)) ! And now a few singles print *,"The same floats in single precision:" do i=1,10 print *, rng%F01() end do end