Go to the documentation of this file.
13 REAL,
DIMENSION(:),
INTENT(IN) :: xx
30 ascnd = (xx(
n) >= xx(1))
37 if (ascnd .eqv. (
x >= xx(
jm)))
then
52 else if (
x == xx(
n))
then
62 pure SUBROUTINE hunt(xx,x,jlo)
71 INTEGER,
INTENT(INOUT) :: jlo
73 REAL,
DIMENSION(:),
INTENT(IN) :: xx
75 LOGICAL ascnd, hunt_up
80 ascnd = (xx(
n) >= xx(1))
82 if (jlo < 0 .or. jlo >
n)
then
91 hunt_up =
x >= xx(jlo) .eqv. ascnd
100 if (
x < xx(jhi) .eqv. ascnd)
exit
113 if (
x >= xx(jlo) .eqv. ascnd)
exit
122 if (jhi-jlo <= 1)
then
123 if (
x == xx(
n)) jlo=
n-1
124 if (
x == xx(1)) jlo=1
128 if (
x >= xx(
jm) .eqv. ascnd)
then