| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=real128), | private | :: | list_a(0:max_n_iter_real128) |
history of the arithmetic mean |
|||
| real(kind=real128), | private | :: | list_g(0:max_n_iter_real128) |
history of the geometric mean |
Safe wrapper for the arithmetic-geometric mean (AGM) computation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(arithmetic_geometric_mean_real128_type), | intent(inout) | :: | agm | |||
| real(kind=real128), | intent(in) | :: | x | |||
| real(kind=real128), | intent(in) | :: | y |
Compute arithmetic–geometric mean (AGM)
using the given arithmetic mean init_a and geometric mean init_g
and store the complete iteration history.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(arithmetic_geometric_mean_real128_type), | intent(inout) | :: | agm | |||
| real(kind=real128), | intent(in) | :: | init_a |
initial value: arithmetic mean |
||
| real(kind=real128), | intent(in) | :: | init_g |
initial value: geometric mean |
Compute arithmetic–geometric mean (AGM)
using the given arithmetic mean init_a and geometric mean init_g
and store the complete iteration history.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(arithmetic_geometric_mean_real128_type), | intent(inout) | :: | agm | |||
| real(kind=real128), | intent(in) | :: | init_a |
initial value: arithmetic mean |
||
| real(kind=real128), | intent(in) | :: | init_g |
initial value: geometric mean |
Safe wrapper for the arithmetic-geometric mean (AGM) computation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(arithmetic_geometric_mean_real128_type), | intent(inout) | :: | agm | |||
| real(kind=real128), | intent(in) | :: | x | |||
| real(kind=real128), | intent(in) | :: | y |
return the number of iterations performed during AGM calculation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(arithmetic_geometric_mean_base_type), | intent(in) | :: | agm |
type, extends(arithmetic_geometric_mean_base_type) :: arithmetic_geometric_mean_real128_type real(real128), private :: list_a(0:max_n_iter_real128) !! history of the arithmetic mean real(real128), private :: list_g(0:max_n_iter_real128) !! history of the geometric mean contains procedure, pass, private :: compute_real128 procedure, pass, private :: compute_kernel_real128 generic, public :: compute => compute_real128 generic, private :: compute_kernel => compute_kernel_real128 end type arithmetic_geometric_mean_real128_type