similar to: more floating point sensitivity in 3.5.0?

Displaying 20 results from an estimated 20000 matches similar to: "more floating point sensitivity in 3.5.0?"

2018 Mar 14
0
Possible Improvement to sapply
>>>>> Henrik Bengtsson <henrik.bengtsson at gmail.com> >>>>> on Tue, 13 Mar 2018 10:12:55 -0700 writes: > FYI, in R devel (to become 3.5.0), there's isFALSE() which will cut > some corners compared to identical(): > > microbenchmark::microbenchmark(identical(FALSE, FALSE), isFALSE(FALSE)) > Unit: nanoseconds > expr
2018 Apr 23
0
R 3.5.0 is released
The build system rolled up R-3.5.0.tar.gz (codename "Joy in Playing") this morning. The list below details the changes in this release. You can get the source code from http://cran.r-project.org/src/base/R-3/R-3.5.0.tar.gz or wait for it to be mirrored at a CRAN site nearer to you. Binaries for various platforms will appear in due course. For the R Core Team, Peter Dalgaard
2018 Apr 23
0
R 3.5.0 is released
The build system rolled up R-3.5.0.tar.gz (codename "Joy in Playing") this morning. The list below details the changes in this release. You can get the source code from http://cran.r-project.org/src/base/R-3/R-3.5.0.tar.gz or wait for it to be mirrored at a CRAN site nearer to you. Binaries for various platforms will appear in due course. For the R Core Team, Peter Dalgaard
2020 Aug 22
1
M[cbind()] <- assignment with Matrix object loses attributes
Thanks for taking a look! Hmm, really? In `R Under development (unstable) (2020-08-14 r79020)`, doing the indexed assignment with a regular matrix (as opposed to a Matrix) appears to preserve attributes. m1 <- matrix(1:9,3,3) attr(m1,"junk") <- 12 stopifnot(isTRUE(attr(m1,"junk")==12)) ## OK m1[cbind(1:2,2:3)] <- 1
2020 Feb 21
0
function(x) !is.na(x) & x "is_true(.)" etc. was: [R] How to index..
Diverted from R-help to R-devel, as I've changed the focus to consider adding new functions to R : >>>>> peter dalgaard >>>>> on Fri, 21 Feb 2020 10:46:16 +0100 writes: > It has isTRUE, but that is not vectorized, and in fact explicitly tests length==1, so >> isTRUE(c(TRUE,FALSE,NA)) > [1] FALSE >> isTRUE(c(TRUE,TRUE,
2006 Dec 09
2
Floating point maths in R
Hi, I am not sure if this is just me using R (R-2.3.1 and R-2.4.0) in the wrong way or if there is a more serious bug. I was having problems getting some calculations to add up so I ran the following tests: > (2.34567 - 2.00000) == 0.34567 <------- should be true [1] FALSE > (2.23-2.00) == 0.23 <------- should be true [1] FALSE > 4-2==2 [1] TRUE > (4-2)==2 [1] TRUE >
2020 Aug 11
2
M[cbind()] <- assignment with Matrix object loses attributes
? Does this constitute a bug, or is there something I'm missing? assigning sub-elements of a sparse Matrix via M[X]<-..., where X is a 2-column matrix, appears to drop user-assigned attributes. I dug around in the R code for Matrix trying to find the relevant machinery but my brain started to hurt too badly ... ?? Will submit this as a bug if it seems warranted. library(Matrix) m1
2006 Jan 10
2
Correct way to test for exact dimensions of matrix or array
Dear R Users, I want to test the dimensions of an incoming vector, matrix or array safely and succinctly. Specifically I want to check if the unknown object has exactly 2 dimensions with a specified number of rows and columns. I thought that the following would work: > obj=matrix(1,nrow=3,ncol=5) > identical( dim( obj) , c(3,5) ) [1] FALSE But it doesn't because c(3,5) is numeric
2005 Dec 12
2
More floating point errors
Hi! It seems that using a different compiler (I assume the development is done with MSC) uncovers various issues with the floating point. Here is the second one I'm seeing - DOMAIN error from sqrt(). In the open_loop_nbest_pitch(), this line: g = DIV32(corr[i-start], 10+SHR32(MULT16_16(spx_sqrt(e0),spx_sqrt(energy[i-start]) ),6)); The values are: e0 is 7.2 i is 142, start is 17
2010 Apr 07
1
Vectorized forms of isTRUE, identical and all.equal?
Dear all, I'm wondering if there exist vectorized forms of 'isTRUE()', 'identical()' and 'all.equal()'. My problem is that I wish to test if each element of a vector is equal to a particular value (or numerically close), whilst dealing carefully with NAs and so on. However, using sapply() with identical() is very slow because it makes so many separate function calls:
2020 Aug 22
0
M[cbind()] <- assignment with Matrix object loses attributes
Hi Ben, I had some problems reproducing this. As far as I can tell *all* indexed assignments drop attributes. (Maybe we have different versions). I'm not an expert on S4, but I'm unenthusiastic about mixing slot (S4) semantics with attribute (S3) semantics. And str() excludes attributes, but attributes() includes slots. Highlighting the problems here... I think R should generate an
2014 Sep 19
2
[LLVMdev] More careful treatment of floating point exceptions
Hi, I'd like to make code emitted by LLVM that includes floating point operations which raise FP exceptions behave closer to what is defined by IEEE754 standard. I'm not going to "fix everything", just incorrect behaviour I faced so far. Most of troubles regarding FP exceptions are caused by optimizations, so there should be a flag to disable/block them if one wants to get
2009 Jun 16
1
Testing if all elements are equal in a vector/matrix
Hi All, There are several replies to the question below, but I think there must exist a better way of doing so. I just want to check whether all the elements of a vector are same. My vector has one million elements and it is highly likely that there are distinct elements in the first few itself. For example: > x = c(1,2,rep(1,100000)) I want the answer as FALSE, which is clear from the
2018 Aug 31
0
compairing doubles
Ah, my bad, you're right of course. sum(abs(diff(diff( sort(x))))) < eps for some reasonable eps then, would do as a oneliner, or all(abs(diff(diff(sort(x)))) < eps) or max(abs(diff(diff(sort(x))))) < eps -Mark Op vr 31 aug. 2018 om 16:14 schreef I?aki Ucar <iucar at fedoraproject.org>: > El vie., 31 ago. 2018 a las 16:00, Mark van der Loo > (<mark.vanderloo at
2007 Sep 03
3
When 1+2 != 3 (PR#9895)
Full_Name: Marco Vicentini, University of Verona Version: 2.4.1 & 2.5.1 OS: OsX & WinXP Submission from: (NULL) (157.27.253.46) When I proceed to test the following equation 1 + 2 == 3, I obviously obtain the value TRUE. But when I tryed to do the same using real number (i.e. 0.1 + 0.2 == 0.3) I obtained an unusual FALSE. In the online help there are some tricks for this problem. It
2008 Feb 18
2
Number of digits of a value for problem 7.31 RFAQ
Hello dear R users! I did not find a function which gives information about the number of digits of a value shown by R. Do you know one? I need it to solve the problem (see RFAQ 7.31)that 0.2==0.2+0.1-0.1 FALSE The solution suggested in RFAQ is to use isTRUE(all.equal(0.2,0.2+0.1-0.1)) But if I want to compare inequality: 0.2<=0.2 +0.1-0.1 TRUE but 0.2<=0.2 +0.1-0.1 FALSE bad! but in
2013 May 30
2
RFC: a "safe" uniroot() function for future R
With main R releases only happening yearly in spring, now is good time to consider *and* discuss new features for what we often call "R-devel" and more officially is R Under development (unstable) (.....) -- "Unsuffered Consequences" Here is one such example I hereby expose to public scrutiny: A few minutes ago, I've committed the following to R-devel (the
2018 Aug 31
2
compairing doubles
Le 31/08/2018 ? 16:25, Mark van der Loo a ?crit?: > Ah, my bad, you're right of course. > > sum(abs(diff(diff( sort(x))))) < eps > > for some reasonable eps then, would do as a oneliner, or > > all(abs(diff(diff(sort(x)))) < eps) > > or > > max(abs(diff(diff(sort(x))))) < eps Or with only four function calls: diff(range(diff(sort(x)))) < eps
2018 Aug 31
2
compairing doubles
El vie., 31 ago. 2018 a las 16:00, Mark van der Loo (<mark.vanderloo at gmail.com>) escribi?: > > how about > > is_evenly_spaced <- function(x,...) all.equal(diff(sort(x)),...) This doesn't work, because 1. all.equal does *not* return FALSE. Use of isTRUE or identical(., TRUE) is required if you want a boolean. 2. all.equal compares two objects, not elements in a vector.
2018 Mar 13
2
Possible Improvement to sapply
FYI, in R devel (to become 3.5.0), there's isFALSE() which will cut some corners compared to identical(): > microbenchmark::microbenchmark(identical(FALSE, FALSE), isFALSE(FALSE)) Unit: nanoseconds expr min lq mean median uq max neval identical(FALSE, FALSE) 984 1138 1694.13 1218.0 1337.5 13584 100 isFALSE(FALSE) 713 761 1133.53 809.5 871.5