| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=0.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,TW_CX,TW_GC,TW_IB,TW_JL,TW_YM,T_RP_MATCHES_RCVD |
| X-Spam-Check-By: | sourceware.org |
| From: | =?iso-8859-1?Q?Hans_J=F8rgen_Aagaard_Jensen?= <hjj AT ifk DOT sdu DOT dk> |
| To: | "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com> |
| Date: | Sat, 12 Jun 2010 09:07:22 +0200 |
| Subject: | bug in NINT() in gfortran |
| Message-ID: | <7E93C5822639AC4B917B413898A805AA7769505D37@ADM-EXMBX0CD.adm.c.sdu.dk> |
| MIME-Version: | 1.0 |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
The NINT() intrinsic in current gfortran under cygwin has a bug. Below foll=
ows:
1) small test program
2) output from this program
3) output from "gfortran -v"
(I am not submitting this to the gcc bugzilla, because the test worked OK o=
n all the linux systems I tested.)
(I found the error becaus our quantum chemistry softward dirac (http://dira=
c.chem.sdu.dk) failed a few of the internal tests.)
-- Hans J=F8rgen Aa. Jensen
=3D=3D=3D=3D=3D=3D=3D 1) small test program =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
program test
double precision xval
xval =3D 132843.61283756854D0
do i =3D 1,7
ipoint =3D nint(xval)
write (6,*), xval, ipoint
xval =3D 10.0d0*xval
end do
return
end
=3D=3D=3D=3D=3D=3D=3D 1) output =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
132843.61283756854 132844
1328436.1283756853 -1596096578
13284361.283756852 13284361
132843612.83756852 132843613
1328436128.3756852 1328436128
13284361283.756851 -2147483648
132843612837.56851 -2147483648
=3D=3D=3D=3D=3D=3D=3D 1) gfortran -v =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
Using built-in specs.
Target: i686-pc-cygwin
Configured with: /gnu/gcc/releases/packaging/4.3.4-3/gcc4-4.3.4-3/src/gcc-4=
.3.4/configure --srcdir=3D/gnu/gcc/releases/packaging/4.3.4-3/gcc4-4.3.4-3/=
src/gcc-4.3.4 --prefix=3D/usr --exec-prefix=3D/usr --bindir=3D/usr/bin --sb=
indir=3D/usr/sbin --libexecdir=3D/usr/lib --datadir=3D/usr/share --localsta=
tedir=3D/var --sysconfdir=3D/etc --infodir=3D/usr/share/info --mandir=3D/us=
r/share/man --datadir=3D/usr/share --infodir=3D/usr/share/info --mandir=3D/=
usr/share/man -v --with-gmp=3D/usr --with-mpfr=3D/usr --enable-bootstrap --=
enable-version-specific-runtime-libs --with-slibdir=3D/usr/bin --libexecdir=
=3D/usr/lib --enable-static --enable-shared --enable-shared-libgcc --disabl=
e-__cxa_atexit --with-gnu-ld --with-gnu-as --with-dwarf2 --disable-sjlj-exc=
eptions --enable-languages=3Dada,c,c++,fortran,java,objc,obj-c++ --disable-=
symvers --enable-libjava --program-suffix=3D-4 --enable-libgomp --enable-li=
bssp --enable-libada --enable-threads=3Dposix --with-arch=3Di686 --with-tun=
e=3Dgeneric --enable-libgcj-sublibs CC=3Dgcc-4 CXX=3Dg++-4 CC_FOR_TARGET=3D=
gcc-4 CXX_FOR_TARGET=3Dg++-4 GNATMAKE_FOR_TARGET=3Dgnatmake GNATBIND_FOR_TA=
RGET=3Dgnatbind AS=3D/opt/gcc-tools/bin/as.exe AS_FOR_TARGET=3D/opt/gcc-too=
ls/bin/as.exe LD=3D/opt/gcc-tools/bin/ld.exe LD_FOR_TARGET=3D/opt/gcc-tools=
/bin/ld.exe --with-ecj-jar=3D/usr/share/java/ecj.jar
Thread model: posix
gcc version 4.3.4 20090804 (release) 1 (GCC)=20
=3D=3D=3D=3D=3D=3D=3D end of e-mail =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |