get_random_number Function

public function get_random_number(a, b) result(x)

Returns a uniform random number x, such that: a <= x < b.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: a
real(kind=wp), intent(in) :: b

Return Value real(kind=wp)


Called by

proc~~get_random_number~~CalledByGraph proc~get_random_number random_module::get_random_number proc~geopotential_module_test geopotential_module::geopotential_module_test proc~geopotential_module_test->proc~get_random_number proc~lambert_test lambert_module::lambert_test proc~lambert_test->proc~get_random_number

Source Code

    function get_random_number(a,b) result(x)

    implicit none

    real(wp)            :: x
    real(wp),intent(in) :: a
    real(wp),intent(in) :: b

    call random_number(x)

    x = a + (b-a)*x

    end function get_random_number