Displaying 20 results from an estimated 4000 matches similar to: "src/nmath/pgeom.c (PR#1834)"
2002 Feb 28
4
pexp.c (PR#1335)
Full_Name: M Welinder
Version: 1.4
OS: (src)
Submission from: (NULL) (192.5.35.38)
It seems to me that pexp can be improved in the lower_tail=TRUE and log_p=FALSE
case by using expm1. Something like
-expm1 (-x / scale);
I think.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send
2004 Apr 19
2
pgeom accuracy (PR#6792)
Full_Name: Morten Welinder
Version: snapshot
OS:
Submission from: (NULL) (65.213.85.218)
This should fix the remaining two 1-p cancellation issues.
double l_rt = log1p (-p) * (x + 1);
if (log_p)
return R_DT_Clog (l_rt);
else
return lower_tail ? -expm1 (l_rt) : exp (l_rt);
2002 Jan 07
3
qbeta function (FYI, compiler bug)
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
2002 Feb 28
1
pweibull.c (PR#1334)
Full_Name: M Welinder
Version: 1.4
OS: (src)
Submission from: (NULL) (192.5.35.38)
It seems to me that pweibull can be improved in the lower_tail=TRUE and
log_p=FALSE
case by using expm1. Something like
-expm1(-pow(x / scale, shape)),
I think.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read
2004 Oct 22
3
pgamma discontinuity (PR#7307)
Full_Name: Morten Welinder
Version: 2
OS: Solaris/space/gcc2.95.2
Submission from: (NULL) (65.213.85.217)
I changed src/nmath/standalone/test.c to read:
---------------------------------------------------------------------------------
#define MATHLIB_STANDALONE 1
#include <Rmath.h>
#include <stdio.h>
int
main()
{
double x;
for (x = 99990; x <= 100009; x++)
printf
2004 Apr 11
3
pcauchy precision (PR#6756)
Full_Name: Morten Welinder
Version: snapshot
OS:
Submission from: (NULL) (65.213.85.129)
Two things are wrong.
1. There is nan test outside IEEE_754.
2. The meat part of the function should really be something like...
if (!lower_tail)
x = -x;
if (fabs (x) > 1) {
double temp = atan (1 / x) / M_PI;
return (x > 0) ? R_D_Clog (temp) : R_D_val (-temp);
} else
2004 Mar 24
1
R_DT_val accuracy (PR#6692)
Full_Name: M. Welinder
Version: 1.8.1
OS: Solaris
Submission from: (NULL) (65.213.85.227)
Currently R has...
#define R_D_Lval(p) (lower_tail ? (p) : (1 - (p))) /* p */
#define R_D_val(x) (log_p ? log(x) : (x)) /* x in pF(x,..) */
#define R_DT_val(x) R_D_val(R_D_Lval(x)) /* x in pF */
...which is sub-optimal in the lower_tail==FALSE && log_p==TRUE case.
Something like this ought
2003 May 01
2
qbeta hang (PR#2894)
Full_Name: Morten Welinder
Version: 1.6.1
OS: Solaris/sparc
Submission from: (NULL) (65.213.85.144)
qbeta(0.1, 1e-8, 0.5, TRUE, FALSE) seems to hang for me.
2005 May 27
1
qcauchy accuracy (PR#7902)
Full_Name: Morten Welinder
Version: 2.1.0
OS: src only
Submission from: (NULL) (216.223.241.212)
Now that pcauchy has been fixed, it is becoming clear that qcauchy suffers from
the same problems.
qcauchy(pcauchy(1e100,0,1,FALSE,TRUE),0,1,FALSE,TRUE)
should yield 1e100 back, but I get 1.633178e+16. The code below does much
better. Notes:
1. p need not be finite. -Inf is ok in the log_p
2005 Aug 11
1
include C functions from nmath in my own C functions
Hi:
I followed the README in src/nmath/standalone/
to make the use the command "make shared" to make the
libRmath.so file. I also add the directories containg
libRmath.so to LD_LIBRARY_PATH by using command
"export
D_LIBRARY_PATH=$LD_LIBRARY_PATH:$/home/zhliu/Backup/R-2.0.1/src/nmath/standalon
e
"
However, when I try to run the following codes by the
command
2005 Aug 11
1
include C functions from nmath in my own C functions
Hi:
I followed the README in src/nmath/standalone/
to make the use the command "make shared" to make the
libRmath.so file. I also add the directories containg
libRmath.so to LD_LIBRARY_PATH by using command
"export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$/home/zhliu/Backup/R-2.0.1/src/nmath/standalon
e
"
However, when I try to run the following codes.
2004 Dec 20
2
R and Gnumeric?
Hi all,
A hopefully quick query. I was reading a posting over at
gnomedesktop.org on the latest release of Gnumeric 1.4:
http://gnomedesktop.org/node/2090
There is a mention there:
Improved accuracy:
While Gnumeric 1.2 was already the best available source for
accuracy in statistical calculations, Gnumeric 1.4 is even
better. We are cooperating with The R Project to
2005 Jun 25
1
comment in src/nmath/dgamma.c
Hi,
In src/nmath/dgamma.c the comment at the top says
* DESCRIPTION
*
* Computes the density of the gamma distribution,
*
* 1/s (x/s)^{a-1} exp(-x/s)
* p(x;a,s) = -----------------------
* (a-1)!
*
* where `s' is the scale (= 1/lambda in other parametrizations)
* and `a' is the shape parameter ( = alpha in
2010 Feb 10
1
Copyright on src/nmath/qnorm.c
At the top of src/nmath/qnorm.c it is stated:
* Copyright (C) 1998 Ross Ihaka
* Copyright (C) 2000--2005 The R Development Core Team
* based on AS 111 (C) 1977 Royal Statistical Society
* and on AS 241 (C) 1988 Royal Statistical Society
The routine is in fact an f2c'd version of AS241 from StatLib:
http://lib.stat.cmu.edu/apstat/241 and http://lib.stat.cmu.edu/apstat/
It
2005 Feb 23
1
Re: [R-SIG-Mac] Bug running pbinom() in R-GUI?
The real problem is that pbeta can take forever. That's bug #7153 and a fix is
within reach.
Morten
2003 Aug 25
1
Re: R 1.7.x and inaccurate log1p() on OpenBSD 3.2 and NetBSD 1.6 (PR#3979)
>> I have come across your reported log1p error (#2837) on a NetBSD (1.6W)
>> system.
I've just made further experiments on the deficient log1p() function
on OpenBSD 3.2 and NetBSD 1.6 with this test program:
% cat bug-log1p.c
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int
main(int argc, char* argv[])
{
int k;
double x;
for (k = 0; k
2000 Nov 28
1
non-centrality parameter in pf() (PR#752)
Bug Description:
Problem with the function pf() when the non-centrality
parameter is large. Here is a sample command. You should
see a smooth line from 0 to about 55, and then the values
of pf() go crazy from 55 to 100.
############################
ncp <- seq(0,100,length=200)
plot(ncp,pf(5,7,2,ncp=ncp))
############################
Version:
platform = i686-pc-linux-gnu
arch = i686
os =
2005 Feb 11
1
Re: [R-SIG-Mac] Bug running pbinom() in R-GUI?
On Feb 10, 2005, at 7:38 PM, George W. Gilchrist wrote:
> Today I was running a graduate level stats lab using R and we
> encountered a
> major problem while using the current build of the Cocoa GUI:
>
>> From the GUI:
>> system.time(pbinom(80, 1e5, 806/1e6))
> [1] 14.37 4.94 30.29 0.00 0.00
>>
>
>> From the command line on the same machine:
>>
2006 Jan 28
1
PR#8528
On 23/02/05 I suggested that given R had included TOMS 708 to correct for t=
he=20
poor performance of pbeta, TOMS 654 should be included to fix all the pgamm=
a=20
problems. I was slightly surprised to find Morten's code had been included=
=20
instead 2 days later. I noticed but did not worry that the reference to me =
had=20
been removed.=20
The derivation of the asymptotic expansion for
2002 Jan 14
1
trouble using R Mathlib as standalone
Dear People,
I am trying to use R's Math library as standalone, as documented in
/src/nmath/standalone. I am using C++ in Debian testing, and the versions
are as follows:
ii g++-3.0 3.0.3-1 The GNU C++ compiler.
ii r-mathlib 1.4.0-1 `GNU S' - Standalone R math library
I have a file (rand.cc) as follows. I don't think that lattice.hh or mh.hh
are very