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
* [Bug fortran/36305] real and imaginary part of complex exponential
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 ` kargl at gcc dot gnu dot org
2008-05-25 20:09 ` tkoenig at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: kargl at gcc dot gnu dot org @ 2008-05-23 3:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from kargl at gcc dot gnu dot org 2008-05-23 03:02 -------
Upgrade your compiler. 4.1.2 is extremely old, and the 4.1.x branch
is no longer maintained. With 4.2.3, the first four values are
0.99950656E+00 0.31410759E-01 0.99950656E+00 0.31410759E-01
0.99802673E+00 0.62790520E-01 0.99802673E+00 0.62790520E-01
0.99556196E+00 0.94108313E-01 0.99556196E+00 0.94108313E-01
0.99211470E+00 0.12533323E+00 0.99211470E+00 0.12533323E+00
With 4.4.0, the first four values are
0.99950656E+00 0.31410759E-01 0.99950656E+00 0.31410759E-01
0.99802673E+00 0.62790520E-01 0.99802673E+00 0.62790520E-01
0.99556196E+00 0.94108313E-01 0.99556196E+00 0.94108313E-01
0.99211470E+00 0.12533323E+00 0.99211470E+00 0.12533323E+00
This PR should be closed with a WONTFIX.
--
kargl at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
Known to work| |4.2.3 4.4.0
Priority|P3 |P4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36305
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/36305] real and imaginary part of complex exponential
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
1 sibling, 0 replies; 3+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2008-05-25 20:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tkoenig at gcc dot gnu dot org 2008-05-25 20:08 -------
This works for me down to 4.1.3:
$ gfortran-4.1 -static foo.f
$ ./a.out
$ head -4 fort.10
0.99950656E+00 0.31410759E-01 0.99950656E+00 0.31410759E-01
0.99802673E+00 0.62790520E-01 0.99802673E+00 0.62790520E-01
0.99556196E+00 0.94108313E-01 0.99556196E+00 0.94108313E-01
0.99211470E+00 0.12533323E+00 0.99211470E+00 0.12533323E+00
$ gfortran-4.1 -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1
--enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug
--enable-mpfr --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.3 20080114 (prerelease) (Debian 4.1.2-19)
This must have been fixed a long time ago.
I'd like to echo Steve's advice: You should upgrade to 4.3.0 at least,
or wait another week for the 4.3.1 release.
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Known to work|4.2.3 4.4.0 |4.2.3 4.4.0 4.1.2
Resolution| |FIXED
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).