search for: logspace_sub

Displaying 5 results from an estimated 5 matches for "logspace_sub".

2009 Apr 27
0
Patch proposal for logspace_sub
G'day all, I am working on problems where I have to calculate the logarithm of a sum or difference from the logarithms of the individual terms; so the functions logspace_add and logspace_sub which are part of R's API come in handy. However, I noticed that logspace_sub can have problems if both arguments are (very) small or the difference between the arguments are vary small. The logic behind logspace_sup, when called with arguments lx and ly, is: log( exp(lx) - exp(ly) ) = log(...
2013 Nov 07
1
R interface to C API Rf_logspace_{add,sub}?
Is there an R-language interface to the R API C-language functions Rf_logspace_add() and Rf_logspace_sub()? I don't see one but I may not looking under the right name. Various packages have functions which do that same sort of thing (log(exp(x)+exp(y)) and log(exp(x)-exp(y)) without unnecessary floating point errors). They have names like matrixStats::logSumExp(lx, na.rm=FALSE, ...) (the ....
2006 Jan 28
1
PR#8528
...everal ways. If = |x|=20 < .01 it is evaluated by a power series, if x < -0.8 or x > 1 it uses=20 log1p(1+x)-x and for other values it uses a continued fraction which essent= ially=20 evaluates more of the same series used when |x| < .01. Your comments about replacing logspace_add with logspace_sub with simpler= =20 code which works at first sight to be a very sensible improvement. However,= I=20 would be a bit nervous that lnd-lnp could be very large and the exp of it c= ould=20 return infinity. I'm sure this can be accounted for in the code and lnp += =20 log1p(f*exp(lnd-lnp))evaluated...
2005 Apr 18
1
R-2.1.0 is released
...w works even in C++ code that undefines the 'isnan' macro. o R_alloc's limit on 64-bit systems has been raised from just under 2^31 bytes (2Gb) to just under 2^34 (16Gb), and is now checked. o New math utility functions log1pmx(x), lgamma1p(x), logspace_add(logx, logy), and logspace_sub(logx, logy). DEPRECATED & DEFUNCT o The aqua module for MacOS X has been removed: --with-aqua now refers to the unbundled Cocoa GUI. o Capabilities "bzip2", "GNOME, "libz" and "PCRE" are defunct. o The undocumented use of UseMethod() with no...
2005 Apr 18
1
R-2.1.0 is released
...w works even in C++ code that undefines the 'isnan' macro. o R_alloc's limit on 64-bit systems has been raised from just under 2^31 bytes (2Gb) to just under 2^34 (16Gb), and is now checked. o New math utility functions log1pmx(x), lgamma1p(x), logspace_add(logx, logy), and logspace_sub(logx, logy). DEPRECATED & DEFUNCT o The aqua module for MacOS X has been removed: --with-aqua now refers to the unbundled Cocoa GUI. o Capabilities "bzip2", "GNOME, "libz" and "PCRE" are defunct. o The undocumented use of UseMethod() with no...