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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(arithmetic_geometric_mean_real64_type), | intent(in) | :: | agm |
elemental function gap_final_real64(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_real64_type), intent(in) :: agm real(real64) :: gap_final gap_final = gap(agm, agm%n_iter_) end function gap_final_real64