Calculate the elliptic nome using the Horner's method and the following polynomial:
Note
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | k |
elliptic modulus |
elliptic nome
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=real64), | private | :: | comp_k |
|
|||
| real(kind=real64), | private | :: | pw01_eps |
auxiliary parameter |
|||
| real(kind=real64), | private | :: | pw02_k |
|
|||
| real(kind=real64), | private | :: | pw04_eps |
|
|||
| real(kind=real64), | private | :: | sqrt_comp_k |
|
elemental function elliptic_nome_25_real64(k) result(q) !! Calculate the elliptic nome \( q \) using !! the Horner's method and !! the following polynomial: !! $$ !! \begin{align*} !! \varepsilon &:= \frac{ 1 }{ 2 } \frac{ 1 - \sqrt{ { k }^{ \prime } } }{ 1 + \sqrt{ { k }^{ \prime } } } \\ !! q(\varepsilon) &:= \varepsilon !! \\ & + 2 { \varepsilon }^{ 5 } !! \\ & + 15 { \varepsilon }^{ 9 } !! \\ & + 150 { \varepsilon }^{ 13 } !! \\ & + 1707 { \varepsilon }^{ 17 } !! \\ & + 20910 { \varepsilon }^{ 21 } !! \\ & + 268616 { \varepsilon }^{ 25 } !! \end{align*} !! $$ !! @note !! - The elliptic modulus \( k \) should satisfy \( { k }^{ 2 } \le 1/2 \). !! @endnote real(real64), intent(in) :: k !! elliptic modulus \( k \) real(real64) :: q !! elliptic nome \( q \) real(real64) :: comp_k !! \( { k }^{ \prime } \) real(real64) :: pw02_k !! \( { k }^{ 2 } \) real(real64) :: sqrt_comp_k !! \( \sqrt{ { k }^{ \prime } } \) real(real64) :: pw01_eps !! auxiliary parameter \( \varepsilon \) real(real64) :: pw04_eps !! \( { \varepsilon }^{ 4 } \) 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 = &! elliptic_nome_by_epsilon_25( &! pw01_eps = pw01_eps , &! pw04_eps = pw04_eps &! ) end function elliptic_nome_25_real64