Skip to content
ForCADDocumentation

affine_knot_residual Subroutine

public pure subroutine affine_knot_residual(start, finish, point, mantissa, power, signed_result)

Absolute determinant of three parameter pairs as mantissa times radix**power. Its zero identifies exact affine alignment, even for a discontinuous trace. Splitting each factor at half precision gives four exact products. FastTwoSum retains the rounding residual of each addition. Separate radix exponents keep both tiny and overflowing products comparable.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in) :: start(2)
real(kind=rk), intent(in) :: finish(2)
real(kind=rk), intent(in) :: point(2)
real(kind=rk), intent(out) :: mantissa
integer, intent(out) :: power
logical, intent(in), optional :: signed_result