gap_final_real32 Function

private elemental function gap_final_real32(agm) result(gap_final)

Extract the final gap (arithmetic mean - geometric mean).

Warning

This function assumes the AGM computation has been performed via the compute method.
If called on an uninitialized or improperly computed AGM object, the result may be NaN or undefined.

Arguments

Type IntentOptional Attributes Name
type(arithmetic_geometric_mean_real32_type), intent(in) :: agm

Return Value real(kind=real32)


Source Code

    elemental function gap_final_real32(agm) result(gap_final)
        !! Extract the final gap (arithmetic mean - geometric mean).
        !!
        !! @warning
        !! This function assumes the AGM computation has been performed via the `compute` method.  
        !! If called on an uninitialized or improperly computed AGM object,
        !! the result may be NaN or undefined.
        !! @endwarning

        type(arithmetic_geometric_mean_real32_type), intent(in) :: agm



        real(real32) :: gap_final



        gap_final = gap(agm, agm%n_iter_)

    end function gap_final_real32