Extract the final arithmetic-geometric mean from completed AGM calculations.
Specifically, this function returns the smaller 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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(arithmetic_geometric_mean_real128_type), | intent(in) | :: | agm |
elemental function min_final_real128(agm) result(min_final) !! Extract the final arithmetic-geometric mean from completed AGM calculations. !! Specifically, this function returns the smaller 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_real128_type), intent(in) :: agm real(real128) :: min_final min_final = min(agm, agm%n_iter_) end function min_final_real128