Calculate the elliptic nome for the given elliptic modulus
Note
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real128), | intent(in) | :: | k |
elliptic modulus |
elliptic nome
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=real128), | private | :: | comp_k |
|
|||
| real(kind=real128), | private | :: | pw01_eps |
auxiliary parameter |
|||
| real(kind=real128), | private | :: | pw02_k |
|
|||
| real(kind=real128), | private | :: | pw04_eps |
|
|||
| real(kind=real128), | private | :: | q_ref | ||||
| real(kind=real128), | private | :: | sqrt_comp_k |
|
elemental function elliptic_nome_auto_real128(k) result(q) !! Calculate the elliptic nome \( q \) !! for the given elliptic modulus \( k \) !! @note !! - The elliptic modulus \( k \) should satisfy \( { k }^{ 2 } \le 1/2 \). !! - If the calculation does not converge, it returns NaN. !! @endnote real(real128), intent(in) :: k !! elliptic modulus \( k \) real(real128) :: q !! elliptic nome \( q \) real(real128) :: comp_k !! \( { k }^{ \prime } \) real(real128) :: pw01_eps !! auxiliary parameter \( \varepsilon \) real(real128) :: pw02_k !! \( { k }^{ 2 } \) real(real128) :: pw04_eps !! \( { \varepsilon }^{ 4 } \) real(real128) :: q_ref real(real128) :: sqrt_comp_k !! \( \sqrt{ { k }^{ \prime } } \) call evaluate_modulus(k = k, pw02_k = pw02_k, comp_k = comp_k) call calculate_pw04_epsilon( &! & pw02_k = pw02_k , &! & comp_k = comp_k , &! & sqrt_comp_k = sqrt_comp_k , &! & pw01_eps = pw01_eps , &! & pw04_eps = pw04_eps &! ) q_ref = pw01_eps q = &! elliptic_nome_by_epsilon_05( &! pw01_eps = pw01_eps , &! pw04_eps = pw04_eps &! ) if ( abs(q - q_ref) .lt. q_err ) return q_ref = q q = &! elliptic_nome_by_epsilon_09( &! pw01_eps = pw01_eps , &! pw04_eps = pw04_eps &! ) if ( abs(q - q_ref) .lt. q_err ) return q_ref = q q = &! elliptic_nome_by_epsilon_13( &! pw01_eps = pw01_eps , &! pw04_eps = pw04_eps &! ) if ( abs(q - q_ref) .lt. q_err ) return q_ref = q q = &! elliptic_nome_by_epsilon_17( &! pw01_eps = pw01_eps , &! pw04_eps = pw04_eps &! ) if ( abs(q - q_ref) .lt. q_err ) return q_ref = q q = &! elliptic_nome_by_epsilon_21( &! pw01_eps = pw01_eps , &! pw04_eps = pw04_eps &! ) if ( abs(q - q_ref) .lt. q_err ) return q_ref = q q = &! elliptic_nome_by_epsilon_25( &! pw01_eps = pw01_eps , &! pw04_eps = pw04_eps &! ) if ( abs(q - q_ref) .lt. q_err ) return q_ref = q q = &! elliptic_nome_by_epsilon_29( &! pw01_eps = pw01_eps , &! pw04_eps = pw04_eps &! ) if ( abs(q - q_ref) .lt. q_err ) return q_ref = q q = &! elliptic_nome_by_epsilon_33( &! pw01_eps = pw01_eps , &! pw04_eps = pw04_eps &! ) if ( abs(q - q_ref) .lt. q_err ) return q = ieee_value(q, ieee_quiet_nan) end function elliptic_nome_auto_real128