diff options
author | Wojtek Kosior <kwojtus@protonmail.com> | 2019-06-21 16:42:45 +0200 |
---|---|---|
committer | Wojtek Kosior <kwojtus@protonmail.com> | 2019-06-21 16:42:45 +0200 |
commit | f0c404f1bbe16d052abae7254fad666196cdf46e (patch) | |
tree | 8c7dcef82ac14f623150ca504f738b6c38713e3c | |
parent | 8311ea87b4e743c0788dadc582912cd08028c101 (diff) | |
download | fortran-assignment3-f0c404f1bbe16d052abae7254fad666196cdf46e.tar.gz fortran-assignment3-f0c404f1bbe16d052abae7254fad666196cdf46e.zip |
add 2 more testing functions
-rw-r--r-- | src/functions.f90 | 14 |
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 |