Displaying 20 results from an estimated 40000 matches similar to: "highlighting constants"
2009 Aug 30
1
Infinite != NaN?
Greetings. I somehow had the impression that an infinite number, as obtained by dividing by zero, for instance, would be flagged as both missing ("NA") and not a number ("NaN"). It appears that I was wrong on both counts, although the is.finite function correctly returns FALSE in such a case. Please see the appended for some details. I guess that the bottom line is that R
2016 Sep 09
0
Different results for tan(pi/2) and tanpi(1/2)
If pi were stored and computed to infinite precision then yes we would
expect tan(pi/2) to be NaN, but computers in general and R
specifically don't store to infinite precision (some packages allow
arbitrary (but still finite) precision) and irrational numbers cannot
be stored exactly. So you take the value of the built in variable pi,
which is close to the theoretical value, but not exactly
2023 May 19
1
range() for Date and POSIXct could respect `finite = TRUE`
Hi All,
I think there may be some possible confusion about what allowsInf would be
reporting (or maybe its just me :) ) if we did this.
Consider a class "myclass", S3, for starters,
with
setMethod("allowsInf", "myclass", function(obj) FALSE)
Then, what would
myclassthing <- structure(1.5, class = "mything")
myclassthing[1] <- Inf
do. Assumely it
2019 Dec 09
0
Inconsistencies in wilcox.test
So I tried adding Infinity support for all cases.
And it is (as could be expected) more complicated than I thought.
It is easy to add Inf support for the test. The problems start with conf.int=TRUE.
Currently confidence intervals are computed via `uniroot()` and, in the
case of infinities, we are computationally looking for roots over
infinite interval which results in an error. I suspect this
2019 Dec 14
0
Inconsistencies in wilcox.test
>>>>> Martin Maechler
>>>>> on Thu, 12 Dec 2019 17:20:47 +0100 writes:
>>>>> Karolis Koncevi?ius
>>>>> on Mon, 9 Dec 2019 23:43:36 +0200 writes:
>> So I tried adding Infinity support for all cases. And it
>> is (as could be expected) more complicated than I
>> thought.
> "Of course
1999 Jul 23
1
0.65 HPUX/AIX update
The current situation is as follows.
AIX:
* I still need f77 for linking. Using ld with the suggested flags gives
a binary with `exec format error'. The problem seems to be with an
unreferenced __start.
* The floating point (finite|isnan) stuff is strange, but under control,
I think. Plain cc works, gcc has a problem and seems to need having
prototypes turned off for IEEE fp.
2005 Aug 26
1
Memory leakage/violation?
Hi,
I've spotted a possible memory leakage/violation in the latest R v2.1.1
patched and R v2.2.0dev on Windows XP Pro SP2 Eng.
I first caught it deep down in a nested svd algorithm when subtracting a
double 'c' from a integer vector 'a' where both had finite values but
when assigning 'a <- a - c' would report NaNs whereas (a-c) alone would
not. Different runs
2002 Oct 21
1
dist() {"mva" package} bug: treats +/- Inf as NA
Vince Carey found this (thank you!).
Since the fix to the problem is not entirely obvious, I post
this to R-devel as RFC:
help(dist) says:
>> Missing values are allowed, and are excluded from all computations
>> involving the rows within which they occur. If some columns are
>> excluded in calculating a Euclidean, Manhattan or Canberra
>> distance, the sum is
2019 Dec 12
2
Inconsistencies in wilcox.test
>>>>> Karolis Koncevi?ius
>>>>> on Mon, 9 Dec 2019 23:43:36 +0200 writes:
> So I tried adding Infinity support for all cases.
> And it is (as could be expected) more complicated than I thought.
"Of course !" Thank you, Karolis, in any case!
> It is easy to add Inf support for the test. The problems start with conf.int=TRUE.
2005 Jun 17
1
(PR#7951) DispatchOrEval missing in do_isfinite and do_isinfinite
Hi,
OK, if you try to explicitly make them generic, you are told that they
are implicitly already generic:
> setGeneric("is.finite", function(from, ...) standardGeneric("is.finite"))
Error in setGeneric("is.finite", function(from, ...)
standardGeneric("is.finite")) :
"is.finite" is a primitive function; methods can be defined, but
the
2011 May 26
2
NaN, Inf to NA
Hi,
I want to recode all Inf and NaN values to NA, but I;m surprised to see the
result of the following code. Could anybody enlighten me about this?
> df <- data.frame(a=c(NA, NaN, Inf, 1:3))
> df[is.infinite(df) | is.nan(df)] <- NA
> df
a
1 NA
2 NaN
3 Inf
4 1
5 2
6 3
>
Thanks!
Cheers!!
Albert-Jan
2011 May 26
2
NaN, Inf to NA
Hi,
I want to recode all Inf and NaN values to NA, but I;m surprised to see the
result of the following code. Could anybody enlighten me about this?
> df <- data.frame(a=c(NA, NaN, Inf, 1:3))
> df[is.infinite(df) | is.nan(df)] <- NA
> df
a
1 NA
2 NaN
3 Inf
4 1
5 2
6 3
>
Thanks!
Cheers!!
Albert-Jan
2012 Oct 30
0
[LLVMdev] [RFC] Extend LLVM IR to express "fast-math" at a per-instruction level
Hi Micheal,
On Mon, Oct 29, 2012 at 4:34 PM, Michael Ilseman <milseman at apple.com> wrote:
> I
> Flags
> ---
> no NaNs (N)
> - ignore the existence of NaNs when convenient
> no Infs (I)
> - ignore the existence of Infs when convenient
> no signed zeros (S)
> - ignore the existence of negative zero when convenient
>
Does this mean ignore the possibility
2003 May 10
1
error in qr(x)
Hello,
I get the following prompt when tring to compute rlm:
> x<-rlm(core.e, na.action=na.omit)
>Error in qr(x) : NA/NaN/Inf in foreign function call (arg 1)
I checked with is.finite and is.infinite but in both cases i get FALSE and my
missing values are substituted by NA.
what does this error prompt mean and how do I solve it?
thanks in advance, cheers Martin
--
Martin
2004 Sep 09
1
hist( ) fails with 'Inf' values unlike plot( ) (PR#7220)
Full_Name: Elizabeth Purdom
Version: 1.9.1
OS: Windows
Submission from: (NULL) (171.64.102.192)
hist() fails if encounters 'Inf' value, rather than giving warning and removing.
Other graphics, like plot(), don't have this problem. It's actually rather
confusing if you are taking the log of data real valued data with a few
non-positive numbers. hist() works fine in this situation
2007 Mar 22
2
[LLVMdev] a question about constant fold for fdiv
Reid Spencer wrote:
> On Thu, 2007-03-22 at 15:50 -0700, leo han wrote:
>
>> Hello, I have a question about the constant folding for fdiv instructions.
>> For the instruction "fdiv double 0.0, 0.0", the folded result is inf. I
>> think this should be nan. Can anyone tell me why it is not nan?
>>
>
> I think the specification says that it is
2007 Mar 22
0
[LLVMdev] a question about constant fold for fdiv
Jeff Cohen wrote:
> Reid Spencer wrote:
>> On Thu, 2007-03-22 at 15:50 -0700, leo han wrote:
>>
>>> Hello, I have a question about the constant folding for fdiv instructions.
>>> For the instruction "fdiv double 0.0, 0.0", the folded result is inf. I
>>> think this should be nan. Can anyone tell me why it is not nan?
>>>
2010 Feb 01
0
[LLVMdev] Crash in PBQP register allocator
On Sun, 2010-01-31 at 13:28 +1100, Lang Hames wrote:
> Hi Sebastian,
>
> It boils down to this: The previous heuristic solver could return
> infinite cost solutions in some rare cases (despite finite-cost
> solutions existing). The new solver is still heuristic, but it should
> always return a finite cost solution if one exists. It does this by
> avoiding early reduction of
2001 Aug 24
1
Reading Inf and NaN values under windows (PR#1072)
Under windows, R supports IEEE floating point arithmetic, but doesn't
allow conversion of Inf and NaN from character to numeric.
R> is.nan(NaN)
[1] TRUE
R> as.numeric(as.character(NaN))
[1] NA
Warning message:
NAs introduced by coercion
R> is.infinite(Inf)
[1] TRUE
R> as.numeric(as.character(Inf))
[1] NA
Warning message:
NAs introduced by coercion
whereas under Linux
R>
2009 May 01
1
integrate with large parameters
Dear R-users,
i have to integrate the following function
`fun1` <- function (a, l1, l2)
{
exp(log(l1) * (a - 1) - l2 * lgamma(a))
}
but if l1 is large, i get the "non-finite function value" error, so my
idea is to rescale with exp(-l1)
`fun2` <- function (a, l1, l2)
{
exp(log(l1) * (a - 1) - l2 * lgamma(a) - l1)
}
but it seems this doesn't solve the problem, when