search for: expm1

Displaying 20 results from an estimated 63 matches for "expm1".

Did you mean: exp1
2004 Jun 27
1
cross-compiling + expm1
Hello all, Just joined this mailing list -- not sure if this is the right list to send this question, but I have a question about cross-compiling R. I am working with R-1.9.1.tgz. It may just be with my version of mingw32, but it seems that expm1 is not defined, so I tried to ensure that HAVE_EXPM1 was #undef'ed before cross-compiling. The problem is that, in <include/Rmath.h> if it is #undef'ed it is then #define'd as 1, meaning that the line where expm1 is declared automatically not included. I had similar problems w...
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 "info", "help", or "[un]subscribe" (in the "body&qu...
2005 Oct 14
1
expm1, R-2.2.0 and Windows
A user of 'eha' told me that it failed to load in R-2.2.0 on Windows, and ideed, I checked and it fails with the error message "The procedure entry point expm1 could not be located in the dynamic link libary R.dll". I'm using expm1 (from the C math library on Linux, I would guess) in a couple of C functions. This didn't happen with R-2.1.1 (and it doesn't happen with R-2.2.0 on debian), so I need advise about what to do. File a bug repor...
2007 May 23
2
Possible ld.exe problem when building
...reference to `wcrtomb' ../main/libmain.a(plotmath.o):plotmath.c:(.text+0x1c11): undefined reference to `mbrtowc' ../main/libmain.a(plotmath.o):plotmath.c:(.text+0x24d0): undefined reference to `wcrtomb' ../main/libmain.a(arithmetic.o):arithmetic.c:(.text+0x2e7a): undefined reference to `expm1' ../main/libmain.a(gram.o):gram.c:(.text+0x7d): undefined reference to `mbrtowc' ../main/libmain.a(gram.o):gram.c:(.text+0x392): undefined reference to `mbrtowc' ../main/libmain.a(plot.o):plot.c:(.text+0x910): undefined reference to `mbrtowc' ../main/libmain.a(util.o):util.c:(.text+...
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 http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the &q...
2004 Jun 21
2
Cross build Makefile
Hello, I am trying to use Yan and Rossini's Makefile for cross building Windows versions of R packages in Linux with R 1.9.0. When compiling R with the mingw tools I get an error about expm1 being undeclared when first found at src/main/arithmetic.c:1019 If I fiddle a bit with it later on I also get errors about log1p bein undeclared. Any idea what should I look for? I am using R 1.9.0 in Debian, with R-mathlib avaliable, and gcc 3.3. Thanks, iago
2004 Jun 21
2
Cross build Makefile
Hello, I am trying to use Yan and Rossini's Makefile for cross building Windows versions of R packages in Linux with R 1.9.0. When compiling R with the mingw tools I get an error about expm1 being undeclared when first found at src/main/arithmetic.c:1019 If I fiddle a bit with it later on I also get errors about log1p bein undeclared. Any idea what should I look for? I am using R 1.9.0 in Debian, with R-mathlib avaliable, and gcc 3.3. Thanks, iago
2017 Feb 17
4
Wish List: Extensions to the derivatives table
...se it is written in the S language. R is faster but less flexible, since that table is programmed in C. It would be useful if R provided a mechanism for extending the derivative table, or barring that, provided a broader table. Currently unsupported mathematical functions of one argument include expm1, log1p, log2, log10, cospi, sinpi, and tanpi. While manual differentiation of these proposed additions is straight-forward, their absence complicates what otherwise could be much simpler, such as using deriv() or deriv3() to generate functions, for example to use as an nls model. Thanks, [[alte...
2009 Apr 27
0
Patch proposal for logspace_sub
...rm becomes numerically one, then log1p will return -Inf and "large handfuls of accuracy" are thrown away. In such circumstances, it would be better to use the following evaluation scheme: log( exp(lx) - exp(ly) ) = lx + log( - ( exp(ly - lx) - 1 ) ) = lx + log( - expm1(ly-lx) ) The following code, using the equivalent commands and evaluation schemes at the R level, illustrates my points: R> lx <- 2e-17 R> ly <- 1e-17 R> lx + log1p(-exp(ly-lx)) ; lx + log(-expm1(ly-lx)) [1] -Inf [1] -39.1439465808988 R> lx <- 2e-17 R> ly <- 1e-20 R>...
2002 May 11
4
Is this a bug of pweibull()?
In rw1050, I found that > pweibull(3:10, 2) [1] 0.9998766 0.9999999 1.0000000 1.0000000 NaN NaN [7] NaN NaN Warning message: NaNs produced in: pweibull(q, shape, scale, lower.tail, log.p) more surprisingly, > pweibull(3:10, 2.1) [1] 0.9999566 1.0000000 1.0000000 -Inf NaN NaN [7] NaN NaN Warning message: NaNs produced in: pweibull(q,
2020 May 22
1
pbirthday() for larger number of classes
...one can derive the return value if(n > 0) 1 - exp(sum(log1p(-(0:(n-1))/c))) else 0. Simplifying this a bit further one obtains if(n >= 2) 1 - exp(sum(log1p(-(1:(n-1))/c))) else 0. For large c, sum(log1p(-(1:(n-1))/c)) is close to 0, so a more robust version would be to return if(n >= 2) -expm1(sum(log1p(-(1:(n-1))/c))) else 0 in the default case 'coincident = 2' (internally: if (k == 2) ...). ## Auxiliary function *just* considering 'coincident = 2' pbirthday2 <- function(n, classes = 365) { c <- classes # as pbirthday() if(n >= 2) -expm1(sum(log1p(-(1:(...
2002 May 12
2
Is this a bug of pweibull()? (Follow up)
Please allow me to add just a little more about this: nothing wrong with pweibull(), namely, the two cases I reported: pweibull(3:10, 2) and pweibull(3:10, 2.1), in rw1041 and earlier version. I wonder this might just due to the change from rw1041 to rw1050, however, I can't find anything relevant (seems to me) in the News or Readme. Thanks Sundar for the suggestion of using 1 -
2017 Feb 17
1
Wish List: Extensions to the derivatives table
...valuating the impact of different parameterizations on parameter effects curvature. The alternative of more flexible differentiation does not seem to be a difficult addition to R. In S+ (which does not have deriv3) it would simply involve adding the following lines to the switch statement in D expm1 = make.call("*", make.call("exp", expr[[2]]), D(expr[[2]], name)), log1p = make.call("/", D(expr[[2]], name), make.call("+", 1., expr[[2]])), log2 = make.call("/", make.call("/", D(expr[[2]], name), expr[[2]]), quote(log(2)) ), log10...
2004 Jun 20
3
Greater than 1 or less than 1?
I have problem evaluating the expression h = exp(x)/(exp(exp(x))-1) for large negative x. This expression is actually the probability that y = 1 when y is a Poisson random variable truncated at 0, hence must satisfy 0 <= h <= 1. However, when x < -18, I may get an h value that is larger than 1 while the true value should be a quantity that is smaller than but very close to 1. For
2005 Oct 07
1
builiding R from sources
...t maybe I did something wrong), but I keep receiving the following error: -- initially I get -- make: ./Rpwd.exe: Command not found make[1]: ./Rpwd.exe: Command not found ... DR_DLL_BUILD -c arithmetic.c -o arithmetic.o arithmetic.c: In function 'do.math1': arithmetic.c:886: error: 'expm1' undeclared (first use in this function) arithmetic.c:886: error: (Each undeclared identifier is reported only once arithmetic.c:886: error: for each function it appears in.) make[4]: *** [arithmetic.o] Error 1 make[3]: *** [rlibs] Error 2 make[2]: *** [../../bin/R.dll] Error 2 make[1]: *** [rb...
2005 May 27
1
qcauchy accuracy (PR#7902)
...auchy (double p, double location, double scale, int lower_tail, int log_p) { if (isnan(p) || isnan(location) || isnan(scale)) return p + location + scale; R_Q_P01_check(p); if (scale < 0 || !finite(scale)) ML_ERR_return_NAN; if (log_p) { if (p > -1) lower_tail = !lower_tail, p = -expm1 (p); else p = exp (p); } if (lower_tail) scale = -scale; return location + scale / tan(M_PI * p); }
2013 Nov 09
1
typo in help page for log1p
There is a small typo in the Source section of the help page for log1p: Source: 'log1p' and 'expm1' may be taken from the operating system, but if not available there are based on the Fortran subroutine 'dlnrel' there -> they Jen > sessionInfo() R version 3.0.2 (2013-09-25) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C...
2010 May 05
1
testInstalledBasic question
..."cosh" "cummax" [43] "cummin" "cumprod" "cumsum" "digamma" "dim" "dim<-" "dimnames" [50] "dimnames<-" "exp" "expm1" "floor" "gamma" "is.array" "is.finite" [57] "is.infinite" "is.matrix" "is.na" "is.nan" "is.numeric" "length" "length<-" [64...
2005 Apr 14
0
predict.glm(..., type="response") dropping names (and a propsed (PR#7792)
...- function(eta) @@ -73,11 +73,11 @@ "cloglog" = { linkfun <- function(mu) log(-log(1 - mu)) linkinv <- function(eta) - pmax(.Machine$double.eps, - pmin(1 - .Machine$double.eps, - expm1(-exp(eta)))) + pmax(pmin(-expm1(-exp(eta)), 1 - .Machine$double.eps), + .Machine$double.eps) mu.eta <- function(eta) { eta <- pmin(eta, 700) - pmax(.Machine$double.eps, exp(eta)...
2005 Oct 10
1
error compiling R-code
...e me the same error, so my suspicion is that it is just me having this problem. Here is what I get: ... gcc -O2 -Wall -pedantic --std=gnu99 -DLEA_MALLOC -I../include -DHAVE_CONFIG_H -DR_DLL_BUILD -c arithmetic.c -o arithmetic.o arithmetic.c: In function `do_math1': arithmetic.c:886: error: `expm1' undeclared (first use in this function) arithmetic.c:886: error: (Each undeclared identifier is reported only once arithmetic.c:886: error: for each function it appears in.) make[4]: *** [arithmetic.o] Error 1 make[3]: *** [rlibs] Error 2 make[2]: *** [../../bin/R.dll] Error 2 make[1]: *** [rb...