max_final_real32 Function

private elemental function max_final_real32(agm) result(max_final)

Extract the final arithmetic-geometric mean from completed AGM calculations.
Specifically, this function returns the larger of the two final values.

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 max_final_real32(agm) result(max_final)
        !! Extract the final arithmetic-geometric mean from completed AGM calculations.  
        !! Specifically, this function returns the larger of the two final values.
        !!
        !! @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) :: max_final



        max_final = max(agm, agm%n_iter_)

    end function max_final_real32