tanhf Function

public pure function tanhf(x) result(res)

Tangent hyperbolic activation function. Same as the intrinsic tanh, but must be defined here so that we can use procedure pointer with it.

Arguments

Type IntentOptional AttributesName
real(kind=rk), intent(in) :: x(:)

Return Value real(kind=rk) (size(x))


Contents

Source Code


Source Code

  pure function tanhf(x) result(res)
    !! Tangent hyperbolic activation function. 
    !! Same as the intrinsic tanh, but must be 
    !! defined here so that we can use procedure
    !! pointer with it.
    real(rk), intent(in) :: x(:)
    real(rk) :: res(size(x))
    res = tanh(x)
  end function tanhf