similar to: as.integer with base other than ten.

Displaying 20 results from an estimated 3000 matches similar to: "as.integer with base other than ten."

2005 May 19
1
Loading a dynamic library
Hi, I'm trying to load a .dll library into R 2.1.0 on Windows using the "dyn.load" function. The library is compiled with gcc 3.3.3 on cygwin 1.5.16. I compile and link: $ gcc -c myfile.cpp -o myfile.o [HRT] $ gcc -shared myfile.o -o myfile.dll [HRT] I then type, in the R console, > dynload("myfile.dll")[HRT] And R hangs. Any help appreciated. Thanks. Will
2007 Feb 15
1
convert to binary to decimal
Hello, we need to convert a logical vector to a (decimal) integer. Example: a=c(TRUE, FALSE, TRUE) (binary number 101) the function we are looking for should return dec2bin(a)=5 Is there a package for such a function or is it even implemented in the base package? We found the hexmode and octmode command, but not a binmode. We know how to program it ourselves however we are looking for a
2006 Jan 13
0
removing folders doesn't always work
I've been running dovecot for a while now. I've got 1.0alpha5 running on a Slackware linux 10.2 system (i386). My system is using mbox format which means you can't have folders that contain both folders and messages. What I'm seeing is that removing folders doesn't always work. From what I can tell, it only affects folders that contain folders. Dovecot doesn't remove
2017 Jan 12
2
The most efficient way to implement an integer based power function pow in LLVM
> On Jan 12, 2017, at 5:03 AM, Antoine Pitrou via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > On Mon, 9 Jan 2017 11:43:17 -0600 > Wei Ding via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> Hi, >> >> I want an efficient way to implement function pow in LLVM instead of >> invoking pow() math built-in. For algorithm part, I am clear for the
2017 Jan 09
5
The most efficient way to implement an integer based power function pow in LLVM
Hi, I want an efficient way to implement function pow in LLVM instead of invoking pow() math built-in. For algorithm part, I am clear for the logic. But I am not quite sure for which parts of LLVM should I replace built-in pow with another efficient pow implementation. Any comments and feedback are appreciated. Thanks! -- Wei Ding -------------- next part -------------- An HTML attachment was
2017 Jan 12
2
The most efficient way to implement an integer based power function pow in LLVM
> On Jan 12, 2017, at 12:58 PM, Friedman, Eli via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > On 1/12/2017 9:33 AM, Mehdi Amini via llvm-dev wrote: >>> On Jan 12, 2017, at 5:03 AM, Antoine Pitrou via llvm-dev <llvm-dev at lists.llvm.org> wrote: >>> >>> On Mon, 9 Jan 2017 11:43:17 -0600 >>> Wei Ding via llvm-dev <llvm-dev at
2017 Jan 12
2
The most efficient way to implement an integer based power function pow in LLVM
> On Jan 12, 2017, at 2:21 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: > > >> On Jan 12, 2017, at 11:04 AM, Steve (Numerics) Canon <scanon at apple.com <mailto:scanon at apple.com>> wrote: >> >>> >>> On Jan 12, 2017, at 12:58 PM, Friedman, Eli via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>>
2019 Jan 11
2
strtoi output of empty string inconsistent across platforms
>>>>> Martin Maechler >>>>> on Fri, 11 Jan 2019 09:44:14 +0100 writes: >>>>> Michael Chirico >>>>> on Fri, 11 Jan 2019 14:36:17 +0800 writes: >> Identified as root cause of a bug in data.table: >> https://github.com/Rdatatable/data.table/issues/3267 >> On my machine, strtoi("", base =
2019 Jan 11
2
strtoi output of empty string inconsistent across platforms
Identified as root cause of a bug in data.table: https://github.com/Rdatatable/data.table/issues/3267 On my machine, strtoi("", base = 2L) produces NA_integer_ (which seems consistent with ?strtoi: "Values which cannot be interpreted as integers or would overflow are returned as NA_integer_"). But on all the other machines I've seen, 0L is returned. This seems to be
2005 Apr 17
3
RFC: hexadecimal constants and decimal points
These are some points stimulated by reading about C history (and related in their implementation). 1) On some platforms > as.integer("0xA") [1] 10 but not all (not on Solaris nor Windows). We do not define what is allowed, and rely on the OS's implementation of strtod (yes, not strtol). It seems that glibc does allow hex: C99 mandates it but C89 seems not to allow it. I
2007 Nov 22
2
[LLVMdev] llvm-gcc cannot emit @llvm.pow.* ?
Hi, Current llvm-gcc cannot emit llvm intrinsic function like llvm.pow.* and llvm.sin.* For example: double foo(double x, double y) { return pow(x,y); } will compiled into ll: define double @foo(double %x, double %y) { %tmp3 = tail call double @pow( double %x, double %y ) ret double %tmp3 } This is not consistent with llvm language reference. -------------- next part -------------- An
2014 Dec 15
2
Replace atoi and atol with strtol strtoul:Need Help
Hello, I am working on replacing atoi () and atol() functions with strtol() and strtoul() . I came across many files which uses statement like these time_t secs= atoi(data_span.c_str()), here time_t Datatype is not known but wikipedia says that it is integer so is it necessary to replace atoi with strtol over here ?? And is their any document which helps me what each file function does like
2015 Apr 10
2
[LLVMdev] Intercepting dlinfo in memory sanitizer
Thanks! I'll try that. In order to avoid starting a new thread, let me ask you the next question. One of the shared libraries I load calls strtol and msan fails to intercept it. Why would this be? The library seems to be otherwise implemented. One of the potential culprits I saw is that strtol is marked as strong in libc. Is there any workaround? Keno On Thu, Apr 9, 2015 at 3:00 PM, Evgeniy
2014 Dec 19
2
Replace atoi and atol with strtol strtoul:Need Help
On Sat, Dec 20, 2014 at 12:42:08AM +0530, Priyank Bhatt wrote: > As James said I am attaching two file *date.cc* and *datematchdecider.cc* Please send patches, not complete source files: http://trac.xapian.org/browser/git/xapian-core/HACKING#L1176 Patches are much smaller, and don't require the reviewer to work out the exact version of the source file you started from. Cheers, Olly
2006 Sep 21
2
Exponentiate a matrix
Suppose I have a square matrix P P <- matrix(c(.3,.7, .7, .3), ncol=2) I know that > P * P Returns the element by element product, whereas > P%*%P Returns the matrix product. Now, P^2 also returns the element by element product. But, is there a slick way to write P %*% P %*% P Obviously, P^3 does not return the result I expect. Thanks, Harold [[alternative HTML version
2020 Sep 13
2
Invalid transformation in LibCallSimplifier::replacePowWithSqrt?
The transformation in LibCallSimplifier::replacePowWithSqrt with respect to -Inf uses a select instruction, which based on the observed behaviour, incorporates the side effects of the unchosen branch. This means that (for pow) a call to sqrt(-Inf) is materialized. Such a call is specified as having a domain error (C17 subclause 7.12.7.5) since the operand is less than zero. Contrast this with
2007 Nov 22
0
[LLVMdev] llvm-gcc cannot emit @llvm.pow.* ?
Hi, > Current llvm-gcc cannot emit llvm intrinsic function like llvm.pow.* and > llvm.sin.* > For example: > > double foo(double x, double y) { > return pow(x,y); > } > > will compiled into ll: > > define double @foo(double %x, double %y) { > %tmp3 = tail call double @pow( double %x, double %y ) > ret double %tmp3 > } > > This is not
2020 Sep 14
2
Invalid transformation in LibCallSimplifier::replacePowWithSqrt?
Sorry - I misread your example and the problem. I see now where LibCallSimplifier creates the select...but we are immediately erasing that select with the code from the godbolt example. Does the real motivating case have no uses of the pow() result value? On Mon, Sep 14, 2020 at 1:03 PM Sanjay Patel <spatel at rotateright.com> wrote: > Yes, I mean just bail out on the transform in >
2020 Sep 14
2
Invalid transformation in LibCallSimplifier::replacePowWithSqrt?
On Mon, Sep 14, 2020 at 12:45 PM Sanjay Patel <spatel at rotateright.com> wrote: > Yes, that looks like a bug. The transform is ok in general for negative > numbers, but -Inf is a special-case for pow(), right? > If so, we probably need an extra check of the input with > "isKnownNeverInfinity()". > There is an extra check there already, but it uses
2007 Nov 22
2
[LLVMdev] llvm-gcc cannot emit @llvm.pow.* ?
2007/11/22, Duncan Sands <baldrick at free.fr>: > > Hi, > > > Current llvm-gcc cannot emit llvm intrinsic function like llvm.pow.* and > > llvm.sin.* > > For example: > > > > double foo(double x, double y) { > > return pow(x,y); > > } > > > > will compiled into ll: > > > > define double @foo(double %x, double %y) {