Displaying 3 results from an estimated 3 matches for "has_na".
Did you mean:
has_a
2019 Jun 24
1
Calculation of e^{z^2/2} for a normal deviate z
...print(y1) ## 1000.708
> and
>> ly <- lx*100000
>> ly
> [1] 100001000 100002000
>> y1 <- logSumExp(ly)
>> print(y1)
> [1] 100002000
>> logSumExp
> function (lx, idxs = NULL, na.rm = FALSE, ...)
> {
> has_na <- TRUE
> .Call(C_logSumExp, as.numeric(lx), idxs, as.logical(na.rm),
> has_na)
> }
> <bytecode: 0x20c07a8>
> <environment: namespace:matrixStats>
> Maybe this is rather close?
Thank you Jing Hua,
indeed the issue of sums of (very large o...
2019 Jun 24
2
Calculation of e^{z^2/2} for a normal deviate z
>>>>> William Dunlap via R-devel
>>>>> on Sun, 23 Jun 2019 10:34:47 -0700 writes:
>>>>> William Dunlap via R-devel
>>>>> on Sun, 23 Jun 2019 10:34:47 -0700 writes:
> include/Rmath.h declares a set of 'logspace' functions for use at the C
> level. I don't think there are core R functions that call
2019 Jun 24
0
Calculation of e^{z^2/2} for a normal deviate z
...;- c(1000.01, 1000.02)
y0 <- log(sum(exp(lx)))
print(y0) ## Inf
y1 <- logSumExp(lx)
print(y1) ## 1000.708
and
> ly <- lx*100000
> ly
[1] 100001000 100002000
> y1 <- logSumExp(ly)
> print(y1)
[1] 100002000
> logSumExp
function (lx, idxs = NULL, na.rm = FALSE, ...)
{
has_na <- TRUE
.Call(C_logSumExp, as.numeric(lx), idxs, as.logical(na.rm),
has_na)
}
<bytecode: 0x20c07a8>
<environment: namespace:matrixStats>
Maybe this is rather close?
Best wishes,
Jing Hua
________________________________
From: R-devel <r-devel-bounces at r-project....