Bonjour ,
j ai a ecrire la fonction suivante :
t(k)=somme(i=1,V) (|k|^(2*i)*(-1)^(i)*k)/(i!)^2
avec k etant un nombre complexe,
j ai crit ma fonction ma ca m enerve car ca ne marche pas!!! pouvez vous m aider? voila mon code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 function t(k) complex t,k double precision fact t=cmplx(0.,0.) do i=1,V if(abs(k).lt.20.) then t=t+(abs(k)**(2*i))*((-1.)**(i)) & /(real(fact(i))**2) else t=cmplx(0.,0.) end if enddo return end program fg complex t,r print*,t(cmplx(6.,0.)) end
Partager