aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-06-21 16:42:45 +0200
committerWojtek Kosior <kwojtus@protonmail.com>2019-06-21 16:42:45 +0200
commitf0c404f1bbe16d052abae7254fad666196cdf46e (patch)
tree8c7dcef82ac14f623150ca504f738b6c38713e3c
parent8311ea87b4e743c0788dadc582912cd08028c101 (diff)
downloadfortran-assignment3-f0c404f1bbe16d052abae7254fad666196cdf46e.tar.gz
fortran-assignment3-f0c404f1bbe16d052abae7254fad666196cdf46e.zip
add 2 more testing functions
-rw-r--r--src/functions.f9014
1 files changed, 14 insertions, 0 deletions
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