diff --git a/.gitignore b/.gitignore index f3056a3..2b49e7e 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ cmake_install.cmake *.exe lib/ include/ +build/ +bin/ \ No newline at end of file diff --git a/src/spatial/m_geometry.f90 b/src/spatial/m_geometry.f90 index 41780f8..5e13d9f 100644 --- a/src/spatial/m_geometry.f90 +++ b/src/spatial/m_geometry.f90 @@ -161,6 +161,36 @@ module function orient3D(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) result( !! [-ve, 0, +ve] for point d [right, on, left] of the plane defined by points a -> b -> c end function end interface + + interface + module subroutine fastTwoDiff(a, b, x, y) + !! Compute the difference two numbers and compute the numerical round-off error. + !! This should only be used if you know that the magnitude of a is greater than or equal to b, otherwise, you should use the slower twoDiff routine + !====================================================================! + real(r64), intent(in) :: a + !! First number + real(r64), intent(in) :: b + !! Second number + real(r64), intent(out) :: x + !! Result + real(r64), intent(out) :: y + end subroutine + end interface + + interface + module subroutine fastTwoSum(a, b, x, y) + !! Compute the sum of two numbers and compute the numerical round-off error. + !! This should only be used if you know that the magnitude of a is greater than or equal to b, otherwise, you should use the slower twoSum routine + !====================================================================! + real(r64), intent(in) :: a + !! First number + real(r64), intent(in) :: b + !! Second number + real(r64), intent(out) :: x + !! Result + real(r64), intent(out) :: y + end subroutine + end interface interface !====================================================================!