aboutsummaryrefslogtreecommitdiff
path: root/src/functions.f90
blob: 788de6ba2dd391801719159f16ce73c05c8d228b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
MODULE functions

CONTAINS

  FUNCTION my_exp(x) result(y)
    real(kind=8), intent(in) :: x
    real(kind=8) :: y
    y = exp(x)
  END FUNCTION my_exp
  
  FUNCTION my_sin(x) result(y)
    real(kind=8), intent(in) :: x
    real(kind=8) :: y
    y = sin(x)
  END FUNCTION my_sin

  FUNCTION my_poly(x) result(y)
    real(kind=8), intent(in) :: x
    real(kind=8) :: y
    !! for the task some polynomial of order 10 should be tested...
    !! so to have a simple equation I chose Chebyshev polynomial
    y = cos(10 * acos(x))
  END FUNCTION my_poly
  
END MODULE functions