Displaying 20 results from an estimated 300 matches similar to: "new to R coding."
2012 May 21
3
[LLVMdev] APInt::sdivrem error?
I wrote the following bit of code
static APInt FloorOfQuotient(APInt a, APInt b) {
unsigned bits = a.getBitWidth();
APInt q(bits, 1), r(bits, 1);
APInt::sdivrem(a, b, q, r);
* errs() << "sdivrem(" << a << ", " << b << ") = (" << q << ", " << r <<
")\n";
* if (r == 0)
return q;
else {
2012 May 21
0
[LLVMdev] APInt::sdivrem error?
OK, the code for sdivrem in APInt.h is wrong.
Here's what's written:
static void sdivrem(const APInt &LHS, const APInt &RHS,
APInt &Quotient, APInt &Remainder) {
if (LHS.isNegative()) {
if (RHS.isNegative())
APInt::udivrem(-LHS, -RHS, Quotient, Remainder);
else
APInt::udivrem(-LHS, RHS, Quotient, Remainder);
Quotient =
2005 Jun 23
2
quotient and remainder
hi netters
Is there a function in R that can compute the quotient and remainder of a
division calculation? such that when 11 is given as the dividend and 5
the divider, the function returns 2(quotient) and 1(remainder).
Thanks a lot!
_________________________________________________________________
伱佲伔佈佅伮佋佖 MSN Explorer: http://explorer.msn.com/lccn/
2017 May 23
1
flac-dev Digest, Vol 149, Issue 5
Can you guys clarify that by Rice you don't mean unary coding, but
exponential golomb coding?
that issue has confused me before, and probably others.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/flac-dev/attachments/20170523/525651dc/attachment.html>
2013 Apr 03
3
Generating a bivariate joint t distribution in R
Hi,
I conduct a panel data estimation and obtain estimators for two of the
coefficients beta1 and beta2. R tells me the mean and covariance of the
distribution of (beta1, beta2). Now I would like to find the distribution
of the quotient beta1/beta2, and one way to do it is to simulate via the
joint distribution (beta1, beta2), where both beta1 and beta2 follow t
distribution.
How could we
2017 Nov 29
3
RFC: Adding 'no-overflow' keyword to 'sdiv'\'udiv' instructions
Introduction:
We would like to add new keyword to 'sdiv'\'udiv' instructions i.e. 'no-overflow'.
This is the updated solution devised in the discussion: http://lists.llvm.org/pipermail/llvm-dev/2017-October/118257.html
The proposed keywords:
"nof" stands for 'no-overflow'
Syntax:
<result> = sdiv nof <ty> <op1>,
2008 Mar 26
1
deconv
I'm translating a matlab routine to R and I need some equivalent to deconv():
Description: deconv()
[q,r] = deconv(v,u) deconvolves vector u out of vector v, using long
division. The quotient is returned in vector q and the remainder in
vector r such that v = conv(u,q)+r .
If u and v are vectors of polynomial coefficients, convolving them is
equivalent to multiplying the two polynomials, and
2013 Dec 09
3
[LLVMdev] [cfe-dev] ARM EABI and modulo
On Mon, Dec 09, 2013 at 01:58:29PM +0000, Renato Golin wrote:
> I can see the error, and it's just a bad selection of choices. I was
> wrong in assuming that the "eabi" at the end would always force it:
>
> $ clang -target arm-elf-eabi -S mod.c -o - | grep mod
> .file "mod.c"
> bl __modsi3
> bl __umodsi3
I was discussing this with Tim on IRC and he
2010 Apr 23
2
Ogg Index A-mod
I've been looking over Benjamin Schwartz's Skeleton A-mod proposal. I've
been pretty busy with other projects over the past few months, so
haven't had a chance to look at Ogg indexing until now...
In general, I think Benjamin's ideas are sound, they're improvements,
and I'm open to being convinced to take them in the next index version.
We may as well get the index
2007 Oct 11
5
cpufreq: weird bug in set_time_scale
On my test machine, in set_time_scale(),
the following code:
ts->mul_frac = div_frac(MILLISECS(1000), tps32);
crashes with a division by zero error if
tps32 == 1000000000d. Unfortunately, tps32 is
often that value.
Does anyone know why this happens? I''ve
resolved it temporarily by checking for
tps32 == 1000000000 and changing the
value slightly (101000010d works fine
on my test
2023 Sep 05
1
[PATCH nbdkit] server: Move size parsing code (nbdkit_parse_size) to common/include
On Tue, Sep 05, 2023 at 11:09:02AM +0100, Richard W.M. Jones wrote:
> > > +static inline int64_t
> > > +human_size_parse (const char *str,
> > > + const char **error, const char **pstr)
> > > +{
> > > + int64_t size;
> > > + char *end;
> > > + uint64_t scale = 1;
> > > +
> > > + /* XXX Should we
2011 Mar 28
22
[PATCH 00/22] Staging: hv: Cleanup-storage-drivers-phase-III
This patch-set deals with some of the style isues in blkvsc_drv.c. We also
get rid most of the "dead code" in this file:
1) Get rid of most of the forward declarations in this file.
The only remaining forward declarations are to deal with
circular dependencies.
2) Get rid of most of the dead code in the file. Some of
the functions in this file are place holders - they
2011 Mar 28
22
[PATCH 00/22] Staging: hv: Cleanup-storage-drivers-phase-III
This patch-set deals with some of the style isues in blkvsc_drv.c. We also
get rid most of the "dead code" in this file:
1) Get rid of most of the forward declarations in this file.
The only remaining forward declarations are to deal with
circular dependencies.
2) Get rid of most of the dead code in the file. Some of
the functions in this file are place holders - they
2016 Oct 21
2
Problem with REMAINDER? 957%60 be 15 remainder 57 not 15 remainder -3 ?
I'm not mathematically gifted, but shouldn't 957%60 be 15 remainder 57?
Google and my desktop calculator certainly think so.
So where am I going wrong here? The following code
exten => 7,1,Verbose(Context: ${CONTEXT} Exten:${EXTEN})
same => n,Set(myNum=957)
same => n,Set(sec=$[REMAINDER(${myNum},60)])
same => n,Set(sec=$[ABS(${sec})])
same =>
2008 Mar 31
7
[LLVMdev] Reference Manual Clarifications
Here is a patch containing all but one of the changes. I realized that
the remainder/modulo discussion does indeed belongs to the srem
instruction. The semantics of urem are obvious and need no further
clarification.
Best Regards,
Jon
1572,1573c1572,1575
< notation (see below). Floating point constants must have a <a
< href="#t_floating">floating point</a>
2017 Oct 17
3
[RFC] Adding Intrinsics for Masked Vector Integer Division and Remainder
Introduction
==========
We would like to add support for masked vector signed/unsigned integer division and remainder in the LLVM IR by introducing new target-independent intrinsics.
This follows similar work which was done already for masked vector loads and stores - http://lists.llvm.org/pipermail/llvm-dev/2014-October/078059.html.
Another relevant reference is the masked scatter/gather
2005 Jul 16
1
Confidence Intervals for Arbitrary Functions
I have a rather basic background in statistics, and am looking for
assistance in solving what I expect is a common type of problem.
I have measurements of physical processes, and mathematical models of
those processes that I want to feed the measurements into. A simple case
is using measurements of electric power entering and leaving a
power conversion device, sampled at regular intervals, and
2011 Apr 04
18
[PATCH 00/22] Staging: hv: Cleanup storage drivers - Phase IV
More cleanup. In this patch-set we deal with the following issues:
1) While a Linux guest on Hyper-V can be assigned removable media
devices (DVD, floppy etc), these devices are not handled by the
Hyper-V block driver. So, we cleanup all the dead code
dealing with removable media devices.
2) There were multiple functions to retrieve information about
the device. Since much of
2011 Apr 04
18
[PATCH 00/22] Staging: hv: Cleanup storage drivers - Phase IV
More cleanup. In this patch-set we deal with the following issues:
1) While a Linux guest on Hyper-V can be assigned removable media
devices (DVD, floppy etc), these devices are not handled by the
Hyper-V block driver. So, we cleanup all the dead code
dealing with removable media devices.
2) There were multiple functions to retrieve information about
the device. Since much of
2014 Apr 25
4
[LLVMdev] Proposal: add intrinsics for safe division
On April 25, 2014 at 9:52:35 AM, Eric Christopher (echristo at gmail.com) wrote:
Hi Michael,
> I’d like to propose to extend LLVM IR intrinsics set, adding new ones for
> safe-division. There are intrinsics for detecting overflow errors, like
> sadd.with.overflow, and the intrinsics I’m proposing will augment this set.
>
> The new intrinsics will return a structure with two