Hi there, this is just to let you know that the qbeta function, which was copied from R into Gnumeric, has been confirmed to be miscompiled by gcc 2.96 on Linux. (That's Red Hat's compiler.) This shows by qbeta(0.025,4,0.5) ending up taking the wrong branch of "if (alpha <= 0.5)". We compile things in a different context, so this may or may not affect you. The qbeta function was taken from R 0.64. Morten http://www.gnome.org/gnumeric/ http://bugzilla.gnome.org/show_bug.cgi?id=68057 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Morten Welinder <terra@diku.dk> writes:> Hi there, > > this is just to let you know that the qbeta function, which was > copied from R into Gnumeric, has been confirmed to be miscompiled > by gcc 2.96 on Linux. (That's Red Hat's compiler.)Which version? The ones in RH 7.1 and later has seemed to be quite solid, whereas the one shipping with 7.0 was worthless (and so was the first 50 or so fixup revisions of the compiler that should never have been released...).> This shows by qbeta(0.025,4,0.5) ending up taking the wrong > branch of "if (alpha <= 0.5)".> We compile things in a different context, so this may or may not > affect you. The qbeta function was taken from R 0.64. > > Morten0.64 is 2.5 years old! Several things have been fixed since then, including at least one really bad bug in qbeta(). You might want to track the development of R a bit closer (&maybe note that R's math library can now be compiled a a standalone dynlib). The "if (alpha <= 0.5)" line has disappeared in recent versions, but I don't see any trouble in the current version, compiled with gcc-2.96-81:> pbeta(qbeta(0.025,4,0.5),4,.5)[1] 0.025 -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I am not sure if this is still true. Hre is a quick check: (1) R-1.4.0 (Prof. Ripley build), Win2000 > qbeta(0.025,4,0.5) [1] 0.5137795 (2) R-1.4.0 (compiled from source), RH-7.2 (gcc 2.96-98) > qbeta(0.025,4,0.5) [1] 0.5137795 Andy __________________________________ Andy Jaworski Engineering Systems Technology Center 3M Center, 518-1-01 St. Paul, MN 55144-1000 ----- E-mail: apjaworski@mmm.com Tel: (651) 733-6092 Fax: (651) 736-3122 Morten Welinder <terra@diku.dk> To: r-devel@hypatia.math.ethz.ch cc: (bcc: Andrzej P. Jaworski/US-Corporate/3M/US) 01/07/2002 Subject: [Rd] qbeta function (FYI, compiler bug) 09:19 AM Hi there, this is just to let you know that the qbeta function, which was copied from R into Gnumeric, has been confirmed to be miscompiled by gcc 2.96 on Linux. (That's Red Hat's compiler.) This shows by qbeta(0.025,4,0.5) ending up taking the wrong branch of "if (alpha <= 0.5)". We compile things in a different context, so this may or may not affect you. The qbeta function was taken from R 0.64. Morten http://www.gnome.org/gnumeric/ http://bugzilla.gnome.org/show_bug.cgi?id=68057 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. -.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._._ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Thanks all. I checked 1.4 and a clever head here noticed that one problem still seems to be there. In the !IEEE_754 case, either qbeta should zero errno or else pbeta_raw should. A similar problem seems to be in qgamma. Morten -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._