public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/36305]  New: real and imaginary part of complex exponential
@ 2008-05-23  2:42 rbustos76 at yahoo dot com dot ar
  2008-05-23  3:03 ` [Bug fortran/36305] " kargl at gcc dot gnu dot org
  2008-05-25 20:09 ` tkoenig at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: rbustos76 at yahoo dot com dot ar @ 2008-05-23  2:42 UTC (permalink / raw)
  To: gcc-bugs

the following program does not work properly. The value of "y2" should be equal
to the value of "y2". The real and the imaginary part of y2 are inverted!!!

        program riemann
        implicit none
        complex (KIND=8) y,y2,imag
        real (KIND=8) theta,dtheta,thetamax,Pi
        integer i,Ntheta
C******************************
        imag=cmplx(0.0d0,1.0d0)
        Pi=dacos(-1.d0)
        Ntheta=100
        thetamax=2.0d0*Pi
        dtheta=thetamax/real(Ntheta)
        do i=1,Ntheta
        theta=i*dtheta
        y=cdexp(imag*theta)**0.5
        y2=cdexp(imag*theta/2.0d0)
C******************************************
        write(10,1000)real(y),aimag(y)
     &,real(y2),aimag(y2)
        end do
        stop
1000    format(10E16.8)
        end program


-- 
           Summary: real and imaginary part of complex exponential
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rbustos76 at yahoo dot com dot ar


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36305


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-25 20:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-23  2:42 [Bug fortran/36305] New: real and imaginary part of complex exponential rbustos76 at yahoo dot com dot ar
2008-05-23  3:03 ` [Bug fortran/36305] " kargl at gcc dot gnu dot org
2008-05-25 20:09 ` tkoenig at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).