safe_sqrt Function

public elemental function safe_sqrt(x) result(y)

IEEE-correctly-rounded by mandate, so the intrinsic is already bit-identical across compliant compilers.

Arguments

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

Return Value real(kind=wp)


Source Code

   elemental function safe_sqrt(x) result(y)
      !! IEEE-correctly-rounded by mandate, so the intrinsic is
      !! already bit-identical across compliant compilers.
      real(wp), intent(in) :: x
      real(wp) :: y
      y = sqrt(x)
   end function safe_sqrt