From 47b3dde4dcf34f679f4df299670b8a0baa508652 Mon Sep 17 00:00:00 2001 From: wdaniau Date: Tue, 24 Nov 2009 16:33:44 +0000 Subject: [PATCH] Ajout d'un programme test de la fonction ze1 git-svn-id: https://lxsd.femto-st.fr/svn/fvn@57 b657c933-2333-4658-acf2-d3c7c2708721 --- fvn_test/Makefile | 2 +- fvn_test/test_ze1.f90 | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 fvn_test/test_ze1.f90 diff --git a/fvn_test/Makefile b/fvn_test/Makefile index 6aea20b..e1c2b64 100644 --- a/fvn_test/Makefile +++ b/fvn_test/Makefile @@ -4,7 +4,7 @@ include $(BTREE)/Make.inc programs = test_fac$(exext) test_matinv$(exext) test_specfunc$(exext) \ test_det$(exext) test_matcon$(exext) test_matev$(exext) test_sparse$(exext) test_inter1d$(exext) \ test_inter2d$(exext) test_inter3d$(exext) test_akima$(exext) test_lsp$(exext) test_muller$(exext) \ -test_integ$(exext) test_bsyn$(exext) test_bsjn$(exext) test_bskn$(exext) test_bsin$(exext) test_operators$(exext) +test_integ$(exext) test_bsyn$(exext) test_bsjn$(exext) test_bskn$(exext) test_bsin$(exext) test_operators$(exext) test_ze1$(exext) prog:$(programs) diff --git a/fvn_test/test_ze1.f90 b/fvn_test/test_ze1.f90 new file mode 100644 index 0000000..0d62f0e --- /dev/null +++ b/fvn_test/test_ze1.f90 @@ -0,0 +1,40 @@ +program test_ze1 +use fvn_fnlib +implicit none + +complex(8) :: z,resz +complex(8), dimension(6) :: abramowitz_x,abramowitz_y +integer(4) :: i + +abramowitz_x(1)=dcmplx(5.,5.) +abramowitz_y(1)=dcmplx(0.906058d0,0.070209d0) +abramowitz_x(2)=dcmplx(-5.,5.) +abramowitz_y(2)=dcmplx(1.079407d0,0.143879d0) +abramowitz_x(3)=dcmplx(11.,5.) +abramowitz_y(3)=dcmplx(0.932672d0,0.026361d0) +abramowitz_x(4)=dcmplx(-11.,5.) +abramowitz_y(4)=dcmplx(1.084526d0,0.049336d0) +abramowitz_x(5)=dcmplx(15.,18.) +abramowitz_y(5)=dcmplx(0.972359d0,0.029448d0) +abramowitz_x(6)=dcmplx(-15.,18.) +abramowitz_y(6)=dcmplx(1.026183d0,0.036552d0) + +! Value of z*exp(z)*e1(z) from Abramowitz & Stegun +! to cover the different cases of the algo +! +! Case (5,5) modulus <10 with positive real part +! Case (-5,5) modulus <10 with negative real part +! Case (11,5) modulus between 10 and 20 with positive real part +! Case (-11,5) modulus between 10 and 20 with negative real part +! Case (15,18) modulus > 20 with positive real part +! Case (-15,18) modulus > 20 with negative real part + +do i=1,6 + z=abramowitz_x(i) + resz=z*exp(z)*e1(z) + write(*,*) "Tabulated : ",abramowitz_y(i) + write(*,*) "Calculated :",resz + write(*,*) +end do +end program + -- 2.16.4