Re: R-alpha: R 0.12 alpha: problem with qt()

Douglas Bates (bates@stat.wisc.edu)
Wed, 6 Nov 96 12:47 CST


Message-Id: <m0vLD0V-000hhwC@franz.stat.wisc.edu>
Date: Wed, 6 Nov 96 12:47 CST
From: Douglas Bates <bates@stat.wisc.edu>
To: r-testers@stat.math.ethz.ch
Subject: Re: R-alpha: R 0.12 alpha: problem with qt()
In-Reply-To: <Pine.SUN.3.91.961106102638.3467A-100000@zen>
	<Pine.SUN.3.91.961106102638.3467A-100000@zen>

I have been trying to reproduce the bug with the gcc -O option for qt
and friends on Linux and I haven't been able to get the tests to fail
yet.  I am using gcc 2.7.2.1 on a Debian Linux system.  I recompiled
		     $RHOME/src/math/{qbeta,qt}.c
with -g -O and re-linked R.  It still does not fail for me.  This
surprised me.  After looking at the qt.c and qbeta.c code I was almost
sure that it would hang in the loop in qbeta because of the way the
comparisons were being made.

I will recompile the whole of R with the -O option and see if I can
get it to fail that way.

BTW: In qbeta.c, is the reason for the definitions of
 static double zero = 0.0;
 static double one = 1.0;
 ...
because the code was originally translated from Fortran and these were
given in data statements?  It looks unusual and I haven't been able
to think of advantages for writing
  if (x > zero) {
instead of
  if (x > 0.0) {
In fact, in most cases a compiler does a better job on the second
expression than on the first.  It's no big deal; I'm just curious.
  
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-