search for: strrep

Displaying 6 results from an estimated 6 matches for "strrep".

Did you mean: strrev
2016 Jun 01
2
segfault / crash when asking for large memory via strrep()
...ore directly aborts possibly from a bug we can more easily fix. Today I've been working (successfully! - not yet committed) at fixing str() for very large strings. In this process, I've found that pc <- function(.) paste(., collapse=".1.2.3.4.5.") p <- function(.) strrep(pc(.), 64L) p(p(p(p(LETTERS)))) produces a (memory related) segmentation fault (aka "crash") very reproducibly and relatively quickly both on my Linux (Fedora 22) desktop and on our Windows server. *** caught segfault *** address 0x7fc52dc89000, cause 'memory not mapped' Tr...
2016 Jun 01
0
segfault / crash when asking for large memory via strrep()
...we can > more easily fix. > > Today I've been working (successfully! - not yet committed) at > fixing str() for very large strings. > > In this process, I've found that > > pc <- function(.) paste(., collapse=".1.2.3.4.5.") > p <- function(.) strrep(pc(.), 64L) > p(p(p(p(LETTERS)))) > > produces a (memory related) segmentation fault (aka "crash") > very reproducibly and relatively quickly > both on my Linux (Fedora 22) desktop and on our Windows server. > > *** caught segfault *** > address 0x7fc52dc89000, c...
2015 Aug 10
2
Bug or expected behavior of APFloat class?
...zero. However this does not seem to hold. Here's some example code that demonstrates this. ``` #include "llvm/Support/raw_ostream.h" #include "llvm/ADT/APFloat.h" #include <string> using namespace llvm; std::string getString(APFloat f) { SmallVector<char,10> strRep; // FormatPrecision=0 means that the "natural precision" of the number is used f.toString(strRep,/*FormatPrecision=*/0, /*FormatMaxPadding=*/0); return std::string(strRep.begin(), strRep.end()); } uint16_t getBits(APFloat f) { APInt bits = f.bitcastToAPInt(); assert(bits.getAct...
2018 Oct 25
1
small bug in formatC?
formatC(0.0001, digits = 3, format = "f", zero.print="< 0.01") Error in strrep(" ", nc - i1) : invalid 'times' value The problem, if it is one, is in .format.zeros: .format.zeros("0.000", "xxxxxx") Error in strrep(" ", nc - i1) : invalid 'times' value R version 3.5.1. David [[alternative HTML version deleted]]
2006 Oct 26
2
pairs matchning
...RUE), sample(1:2, 10, rep=TRUE))) [,1] [,2] [1,] 1 2 [2,] 1 2 [3,] 1 2 [4,] 2 2 [5,] 1 1 [6,] 1 2 [7,] 1 2 [8,] 1 1 [9,] 1 2 [10,] 1 1 > (B <- unique(A)) [,1] [,2] [1,] 1 2 [2,] 2 2 [3,] 1 1 > strRep <- function(mat) apply(mat, 1, function(x) paste(x, collapse=";")) > strRep(B) [1] "1;2" "2;2" "1;1" > (idx <- match(strRep(A), strRep(B))) [1] 1 1 1 2 3 1 1 3 1 3 > B[idx, ] [,1] [,2] [1,] 1 2 [2,] 1 2 [3,] 1 2 [4,...
2017 Dec 19
1
abort
...sources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_3.4.3 > conditionCall.x <- function(c) strrep("xxx?", 3000) > stop(structure(list(message="1"), class=c("x","condition"))) zsh: abort R --vanilla -q