UltrasphericalZeros
Zeros of Ultraspherical polynomials.
Interface
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE FUNCTION UltrasphericalZeros(n, lambda) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: n
!! order of Ultraspherical polynomial
REAL(DFP), INTENT(IN) :: lambda
!! lambda should be greater than -0.5
REAL(DFP) :: ans(n)
END FUNCTION UltrasphericalZeros
END INTERFACE
This example shows the usage of UltrasphericalZeros
method.
This routine returns the zeros of a jacobi polynomial.
program main
use easifembase
implicit none
integer( i4b ) :: n
real( dfp ), allocatable :: pt( : )
real( dfp ), parameter :: lambda=0.5_DFP
type(string) :: msg, astr
n = 1; call callme
See results
x |
---|
0 |
n = 2; call callme
See results
Zeros of T(x), n = 2
-0.57735 | 0.57735 |
n = 3; call callme
See results
Zeros of T(x), n = 3
-0.7746 | 3.71231E-16 | 0.7746 |
contains
subroutine callme
pt = UltrasphericalZeros( n=n, lambda=lambda )
msg = "Zeros of T(x), n = " &
& // tostring( n )
call display(msg%chars())
astr = MdEncode( pt )
call display( astr%chars(), "" )
end subroutine
end program main