From f0c404f1bbe16d052abae7254fad666196cdf46e Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 21 Jun 2019 16:42:45 +0200 Subject: add 2 more testing functions --- src/functions.f90 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/functions.f90 b/src/functions.f90 index 7216970..788de6b 100644 --- a/src/functions.f90 +++ b/src/functions.f90 @@ -8,4 +8,18 @@ CONTAINS 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 -- cgit v1.2.3