stdlib_math Module


Uses

  • module~~stdlib_math~~UsesGraph module~stdlib_math stdlib_math module~stdlib_optval stdlib_optval module~stdlib_math->module~stdlib_optval module~stdlib_kinds stdlib_kinds module~stdlib_math->module~stdlib_kinds module~stdlib_optval->module~stdlib_kinds iso_fortran_env iso_fortran_env module~stdlib_kinds->iso_fortran_env iso_c_binding iso_c_binding module~stdlib_kinds->iso_c_binding

Used by

  • module~~stdlib_math~~UsedByGraph module~stdlib_math stdlib_math module~stdlib_stringlist_type stdlib_stringlist_type module~stdlib_stringlist_type->module~stdlib_math module~stdlib_math_logspace stdlib_math_logspace module~stdlib_math_logspace->module~stdlib_math module~stdlib_math_arange stdlib_math_arange module~stdlib_math_arange->module~stdlib_math module~stdlib_math_linspace stdlib_math_linspace module~stdlib_math_linspace->module~stdlib_math

Contents


Variables

TypeVisibility AttributesNameInitial
integer, public, parameter:: DEFAULT_LINSPACE_LENGTH =100
integer, public, parameter:: DEFAULT_LOGSPACE_BASE =10
integer, public, parameter:: DEFAULT_LOGSPACE_LENGTH =50
real(kind=dp), public, parameter:: EULERS_NUMBER_DP =exp(1.0_dp)
real(kind=sp), public, parameter:: EULERS_NUMBER_SP =exp(1.0_sp)

Interfaces

public interface arange

arange creates a one-dimensional array of the integer/real type with fixed-spaced values of given spacing, within a given interval. (Specification)

  • public pure function arange_i_int16(start, end, step) result(result)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int16), intent(in) :: start
    integer(kind=int16), intent(in), optional :: end
    integer(kind=int16), intent(in), optional :: step

    Return Value integer(kind=int16), allocatable, (:)

  • public pure function arange_i_int32(start, end, step) result(result)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int32), intent(in) :: start
    integer(kind=int32), intent(in), optional :: end
    integer(kind=int32), intent(in), optional :: step

    Return Value integer(kind=int32), allocatable, (:)

  • public pure function arange_i_int64(start, end, step) result(result)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int64), intent(in) :: start
    integer(kind=int64), intent(in), optional :: end
    integer(kind=int64), intent(in), optional :: step

    Return Value integer(kind=int64), allocatable, (:)

  • public pure function arange_i_int8(start, end, step) result(result)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int8), intent(in) :: start
    integer(kind=int8), intent(in), optional :: end
    integer(kind=int8), intent(in), optional :: step

    Return Value integer(kind=int8), allocatable, (:)

  • public pure function arange_r_dp(start, end, step) result(result)

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(in) :: start
    real(kind=dp), intent(in), optional :: end
    real(kind=dp), intent(in), optional :: step

    Return Value real(kind=dp), allocatable, (:)

  • public pure function arange_r_sp(start, end, step) result(result)

    Arguments

    Type IntentOptional AttributesName
    real(kind=sp), intent(in) :: start
    real(kind=sp), intent(in), optional :: end
    real(kind=sp), intent(in), optional :: step

    Return Value real(kind=sp), allocatable, (:)

public interface clip

  • private elemental function clip_int8(x, xmin, xmax) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int8), intent(in) :: x
    integer(kind=int8), intent(in) :: xmin
    integer(kind=int8), intent(in) :: xmax

    Return Value integer(kind=int8)

  • private elemental function clip_int16(x, xmin, xmax) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int16), intent(in) :: x
    integer(kind=int16), intent(in) :: xmin
    integer(kind=int16), intent(in) :: xmax

    Return Value integer(kind=int16)

  • private elemental function clip_int32(x, xmin, xmax) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int32), intent(in) :: x
    integer(kind=int32), intent(in) :: xmin
    integer(kind=int32), intent(in) :: xmax

    Return Value integer(kind=int32)

  • private elemental function clip_int64(x, xmin, xmax) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int64), intent(in) :: x
    integer(kind=int64), intent(in) :: xmin
    integer(kind=int64), intent(in) :: xmax

    Return Value integer(kind=int64)

  • private elemental function clip_sp(x, xmin, xmax) result(res)

    Arguments

    Type IntentOptional AttributesName
    real(kind=sp), intent(in) :: x
    real(kind=sp), intent(in) :: xmin
    real(kind=sp), intent(in) :: xmax

    Return Value real(kind=sp)

  • private elemental function clip_dp(x, xmin, xmax) result(res)

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(in) :: x
    real(kind=dp), intent(in) :: xmin
    real(kind=dp), intent(in) :: xmax

    Return Value real(kind=dp)

public interface gcd

Returns the greatest common divisor of two integers (Specification)

Read more…
  • private elemental function gcd_int8(a, b) result(res)

    Returns the greatest common divisor of two integers of kind int8 using the Euclidean algorithm.

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int8), intent(in) :: a
    integer(kind=int8), intent(in) :: b

    Return Value integer(kind=int8)

  • private elemental function gcd_int16(a, b) result(res)

    Returns the greatest common divisor of two integers of kind int16 using the Euclidean algorithm.

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int16), intent(in) :: a
    integer(kind=int16), intent(in) :: b

    Return Value integer(kind=int16)

  • private elemental function gcd_int32(a, b) result(res)

    Returns the greatest common divisor of two integers of kind int32 using the Euclidean algorithm.

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int32), intent(in) :: a
    integer(kind=int32), intent(in) :: b

    Return Value integer(kind=int32)

  • private elemental function gcd_int64(a, b) result(res)

    Returns the greatest common divisor of two integers of kind int64 using the Euclidean algorithm.

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int64), intent(in) :: a
    integer(kind=int64), intent(in) :: b

    Return Value integer(kind=int64)

public interface linspace

Create rank 1 array of linearly spaced elements If the number of elements is not specified, create an array with size 100. If n is a negative value, return an array with size 0. If n = 1, return an array whose only element is end (Specification)

Read more…
  • public pure function linspace_default_1_cdp_cdp(start, end) result(res)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=dp), intent(in) :: start
    complex(kind=dp), intent(in) :: end

    Return Value complex(kind=dp) (DEFAULT_LINSPACE_LENGTH)

  • public pure function linspace_default_1_csp_csp(start, end) result(res)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=sp), intent(in) :: start
    complex(kind=sp), intent(in) :: end

    Return Value complex(kind=sp) (DEFAULT_LINSPACE_LENGTH)

  • public pure function linspace_default_1_iint16_iint16(start, end) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int16), intent(in) :: start
    integer(kind=int16), intent(in) :: end

    Return Value real(kind=dp) (DEFAULT_LINSPACE_LENGTH)

  • public pure function linspace_default_1_iint32_iint32(start, end) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int32), intent(in) :: start
    integer(kind=int32), intent(in) :: end

    Return Value real(kind=dp) (DEFAULT_LINSPACE_LENGTH)

  • public pure function linspace_default_1_iint64_iint64(start, end) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int64), intent(in) :: start
    integer(kind=int64), intent(in) :: end

    Return Value real(kind=dp) (DEFAULT_LINSPACE_LENGTH)

  • public pure function linspace_default_1_iint8_iint8(start, end) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int8), intent(in) :: start
    integer(kind=int8), intent(in) :: end

    Return Value real(kind=dp) (DEFAULT_LINSPACE_LENGTH)

  • public pure function linspace_default_1_rdp_rdp(start, end) result(res)

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(in) :: start
    real(kind=dp), intent(in) :: end

    Return Value real(kind=dp) (DEFAULT_LINSPACE_LENGTH)

  • public pure function linspace_default_1_rsp_rsp(start, end) result(res)

    Arguments

    Type IntentOptional AttributesName
    real(kind=sp), intent(in) :: start
    real(kind=sp), intent(in) :: end

    Return Value real(kind=sp) (DEFAULT_LINSPACE_LENGTH)

  • public pure function linspace_n_1_cdp_cdp(start, end, n) result(res)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=dp), intent(in) :: start
    complex(kind=dp), intent(in) :: end
    integer, intent(in) :: n

    Return Value complex(kind=dp) (max(n,0))

  • public pure function linspace_n_1_csp_csp(start, end, n) result(res)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=sp), intent(in) :: start
    complex(kind=sp), intent(in) :: end
    integer, intent(in) :: n

    Return Value complex(kind=sp) (max(n,0))

  • public pure function linspace_n_1_iint16_iint16(start, end, n) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int16), intent(in) :: start
    integer(kind=int16), intent(in) :: end
    integer, intent(in) :: n

    Return Value real(kind=dp) (max(n,0))

  • public pure function linspace_n_1_iint32_iint32(start, end, n) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int32), intent(in) :: start
    integer(kind=int32), intent(in) :: end
    integer, intent(in) :: n

    Return Value real(kind=dp) (max(n,0))

  • public pure function linspace_n_1_iint64_iint64(start, end, n) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int64), intent(in) :: start
    integer(kind=int64), intent(in) :: end
    integer, intent(in) :: n

    Return Value real(kind=dp) (max(n,0))

  • public pure function linspace_n_1_iint8_iint8(start, end, n) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int8), intent(in) :: start
    integer(kind=int8), intent(in) :: end
    integer, intent(in) :: n

    Return Value real(kind=dp) (max(n,0))

  • public pure function linspace_n_1_rdp_rdp(start, end, n) result(res)

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(in) :: start
    real(kind=dp), intent(in) :: end
    integer, intent(in) :: n

    Return Value real(kind=dp) (max(n,0))

  • public pure function linspace_n_1_rsp_rsp(start, end, n) result(res)

    Arguments

    Type IntentOptional AttributesName
    real(kind=sp), intent(in) :: start
    real(kind=sp), intent(in) :: end
    integer, intent(in) :: n

    Return Value real(kind=sp) (max(n,0))

public interface logspace

Create rank 1 array of logarithmically spaced elements from basestart to baseend. If the number of elements is not specified, create an array with size 50. If n is a negative value, return an array with size 0. If n = 1, return an array whose only element is base**end. If no base is specified, logspace will default to using a base of 10

Read more…
  • public pure function logspace_1_cdp_default(start, end) result(res)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=dp), intent(in) :: start
    complex(kind=dp), intent(in) :: end

    Return Value complex(kind=dp) (DEFAULT_LOGSPACE_LENGTH)

  • public pure function logspace_1_cdp_n(start, end, n) result(res)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=dp), intent(in) :: start
    complex(kind=dp), intent(in) :: end
    integer, intent(in) :: n

    Return Value complex(kind=dp) (max(n,0))

  • public pure function logspace_1_cdp_n_cbase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=dp), intent(in) :: start
    complex(kind=dp), intent(in) :: end
    integer, intent(in) :: n
    complex(kind=dp), intent(in) :: base

    Return Value complex(kind=dp) (max(n,0))

  • public pure function logspace_1_cdp_n_ibase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=dp), intent(in) :: start
    complex(kind=dp), intent(in) :: end
    integer, intent(in) :: n
    integer, intent(in) :: base

    Return Value complex(kind=dp) (max(n,0))

  • public pure function logspace_1_cdp_n_rbase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=dp), intent(in) :: start
    complex(kind=dp), intent(in) :: end
    integer, intent(in) :: n
    real(kind=dp), intent(in) :: base

    Return Value complex(kind=dp) (max(n,0))

  • public pure function logspace_1_csp_default(start, end) result(res)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=sp), intent(in) :: start
    complex(kind=sp), intent(in) :: end

    Return Value complex(kind=sp) (DEFAULT_LOGSPACE_LENGTH)

  • public pure function logspace_1_csp_n(start, end, n) result(res)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=sp), intent(in) :: start
    complex(kind=sp), intent(in) :: end
    integer, intent(in) :: n

    Return Value complex(kind=sp) (max(n,0))

  • public pure function logspace_1_csp_n_cbase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=sp), intent(in) :: start
    complex(kind=sp), intent(in) :: end
    integer, intent(in) :: n
    complex(kind=sp), intent(in) :: base

    Return Value complex(kind=sp) (max(n,0))

  • public pure function logspace_1_csp_n_ibase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=sp), intent(in) :: start
    complex(kind=sp), intent(in) :: end
    integer, intent(in) :: n
    integer, intent(in) :: base

    Return Value complex(kind=sp) (max(n,0))

  • public pure function logspace_1_csp_n_rbase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=sp), intent(in) :: start
    complex(kind=sp), intent(in) :: end
    integer, intent(in) :: n
    real(kind=sp), intent(in) :: base

    Return Value complex(kind=sp) (max(n,0))

  • public pure function logspace_1_iint32_default(start, end) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: start
    integer, intent(in) :: end

    Return Value real(kind=dp) (DEFAULT_LOGSPACE_LENGTH)

  • public pure function logspace_1_iint32_n(start, end, n) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: start
    integer, intent(in) :: end
    integer, intent(in) :: n

    Return Value real(kind=dp) (n)

  • public pure function logspace_1_iint32_n_cdpbase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: start
    integer, intent(in) :: end
    integer, intent(in) :: n
    complex(kind=dp), intent(in) :: base

    Return Value complex(kind=dp) (max(n,0))

  • public pure function logspace_1_iint32_n_cspbase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: start
    integer, intent(in) :: end
    integer, intent(in) :: n
    complex(kind=sp), intent(in) :: base

    Return Value complex(kind=sp) (max(n,0))

  • public pure function logspace_1_iint32_n_ibase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: start
    integer, intent(in) :: end
    integer, intent(in) :: n
    integer, intent(in) :: base

    Return Value integer (max(n,0))

  • public pure function logspace_1_iint32_n_rdpbase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: start
    integer, intent(in) :: end
    integer, intent(in) :: n
    real(kind=dp), intent(in) :: base

    Return Value real(kind=dp) (max(n,0))

  • public pure function logspace_1_iint32_n_rspbase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: start
    integer, intent(in) :: end
    integer, intent(in) :: n
    real(kind=sp), intent(in) :: base

    Return Value real(kind=sp) (max(n,0))

  • public pure function logspace_1_rdp_default(start, end) result(res)

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(in) :: start
    real(kind=dp), intent(in) :: end

    Return Value real(kind=dp) (DEFAULT_LOGSPACE_LENGTH)

  • public pure function logspace_1_rdp_n(start, end, n) result(res)

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(in) :: start
    real(kind=dp), intent(in) :: end
    integer, intent(in) :: n

    Return Value real(kind=dp) (max(n,0))

  • public pure function logspace_1_rdp_n_cbase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(in) :: start
    real(kind=dp), intent(in) :: end
    integer, intent(in) :: n
    complex(kind=dp), intent(in) :: base

    Return Value real(kind=dp) (max(n,0))

  • public pure function logspace_1_rdp_n_ibase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(in) :: start
    real(kind=dp), intent(in) :: end
    integer, intent(in) :: n
    integer, intent(in) :: base

    Return Value real(kind=dp) (max(n,0))

  • public pure function logspace_1_rdp_n_rbase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(in) :: start
    real(kind=dp), intent(in) :: end
    integer, intent(in) :: n
    real(kind=dp), intent(in) :: base

    Return Value real(kind=dp) (max(n,0))

  • public pure function logspace_1_rsp_default(start, end) result(res)

    Arguments

    Type IntentOptional AttributesName
    real(kind=sp), intent(in) :: start
    real(kind=sp), intent(in) :: end

    Return Value real(kind=sp) (DEFAULT_LOGSPACE_LENGTH)

  • public pure function logspace_1_rsp_n(start, end, n) result(res)

    Arguments

    Type IntentOptional AttributesName
    real(kind=sp), intent(in) :: start
    real(kind=sp), intent(in) :: end
    integer, intent(in) :: n

    Return Value real(kind=sp) (max(n,0))

  • public pure function logspace_1_rsp_n_cbase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    real(kind=sp), intent(in) :: start
    real(kind=sp), intent(in) :: end
    integer, intent(in) :: n
    complex(kind=sp), intent(in) :: base

    Return Value real(kind=sp) (max(n,0))

  • public pure function logspace_1_rsp_n_ibase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    real(kind=sp), intent(in) :: start
    real(kind=sp), intent(in) :: end
    integer, intent(in) :: n
    integer, intent(in) :: base

    Return Value real(kind=sp) (max(n,0))

  • public pure function logspace_1_rsp_n_rbase(start, end, n, base) result(res)

    Arguments

    Type IntentOptional AttributesName
    real(kind=sp), intent(in) :: start
    real(kind=sp), intent(in) :: end
    integer, intent(in) :: n
    real(kind=sp), intent(in) :: base

    Return Value real(kind=sp) (max(n,0))