search for: quotient

Displaying 20 results from an estimated 76 matches for "quotient".

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 = -Quotient; Remainder = -Remainder; } else if (RHS.isNegative()) { APIn...
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";...
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>
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 deconvolution is polynomial division. The result of dividing v by u is quotient q and remainder...
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 generate a joint t distrubuition in R? Thanks Miao [[alternative HTML version deleted]]
2017 Nov 29
3
RFC: Adding 'no-overflow' keyword to 'sdiv'\'udiv' instructions
...lt <result> = udiv exact <ty> <op1>, <op2> ; yields ty:result + <result> = udiv nof <ty> <op1>, <op2> ; yields ty:result Overview: """"""""" The '``udiv``' instruction returns the quotient of its two operands. Arguments: """""""""" The two arguments to the '``udiv``' instruction must be :ref:`integer <t_integer>` or :ref:`vector <t_vector>` of integer values. Both arguments must have identical types. Semantics:...
2010 Apr 23
2
Ogg Index A-mod
...at? Benjamin: have you made any index A-mod prototype encoders to get an encoded-index size comparison? I also have a few questions about your proposal... > The Golomb-Rice encoded integers are encoded by subtracting 1, > dividing by the > Golomb-Rice parameter, representing first the quotient in unary (1s), > then a 0, > and then the remainder in binary. We subtract 1 because a Golomb-Rice code > naturally represents 0, but 0 is not a valid delta between subsequent > values. > For example, consider encoding a delta of 2496 with a scaling > coefficient of 64 > and...
2011 Oct 24
3
new to R coding.
...I code the following in R. I want to produce a vector where dx=log( (d(x))/(d(x-1)) ). I can do it for dx=diff(log(x)). I am learning/trying to model log returns of a stock market index. But instead of using the difference of the closing values of two consecutive days, i want to use the log of the quotient of the two days. any help is most appreciated. d is a vector of the closing values of the stock market index of length 5000. -- View this message in context: http://r.789695.n4.nabble.com/new-to-R-coding-tp3933588p3933588.html Sent from the R help mailing list archive at Nabble.com.
2013 Dec 09
3
[LLVMdev] [cfe-dev] ARM EABI and modulo
...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 raised the valid question of a pure mod operation being faster when emulated as it doesn't have to keep track of the quotient. So it really boils down to whether it has a fancy enough dress to be called a feature. Joerg
2008 Mar 31
7
[LLVMdev] Reference Manual Clarifications
...ype, execute an operation on them, and 2181,2182c2183 < The result value of a binary operator is not < necessarily the same type as its operands.</p> --- > The result value has the same type as its operands.</p> 2332c2333 < <p>The value produced is the signed integer quotient of the two operands.</p> --- > <p>The value produced is the signed integer quotient of the two operands rounded towards zero.</p> 2386,2387c2387 < This instruction always performs an unsigned division to get the remainder, < regardless of whether the arguments are uns...
2023 Sep 05
1
[PATCH nbdkit] server: Move size parsing code (nbdkit_parse_size) to common/include
...tch) > > could be to change the type of "size" to "intmax_t", from "int64_t". > > That way, the assignment will be safe even theoretically, *and* the > > overflow check at the bottom of the function (with the division & > > comparison of the quotient against INT_MAX) will work just the same. > > I'm always very unsure how this all works. In particular I seem to > recall that intmax_t is no longer really the maximum possible int > (because of int128) and so it's always 64 bit on platforms we care > about. Can Eric comme...
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
2005 Jul 16
1
Confidence Intervals for Arbitrary Functions
...antifying the "overall" efficiency rather than the instantaneous efficiency. If the energy quantities are treated as a normally-distributed random variable (per measurement uncertainty), is there a package that simplifies the determination of the probability distribution function for the quotient of these values? Or, in the general sense, if I have a function that computes a measure of interest, are such tools general enough to handle this? (The goal being to determine a confidence interval for the computed quantity.) As an attempt to understand the issues, I have used SQL to generate disc...
2008 Mar 31
0
[LLVMdev] Reference Manual Clarifications
...m, and > 2181,2182c2183 > < The result value of a binary operator is not > < necessarily the same type as its operands.</p> > --- >> The result value has the same type as its operands.</p> > 2332c2333 > < <p>The value produced is the signed integer quotient of the two > operands.</p> > --- >> <p>The value produced is the signed integer quotient of the two > operands rounded towards zero.</p> > 2386,2387c2387 > < This instruction always performs an unsigned division to get the > remainder, > < regardle...
2012 Mar 02
5
Calculation of standard error for a function
Dear list, If I know the standard error for k1 and k2, is there anything I can call in R to calculate the standard error of k1/k2? Thanks. Jun [[alternative HTML version deleted]]
2008 Mar 26
1
[LLVMdev] Checked arithmetic
...condition codes for multiply and floating point? For scalar multiply, not really. What you *can* do is use the native multiply instruction that does (32x32)->(lower,upper), and then decide based on the upper 32 bits of the result whether you had a multiply-carry. Similarly for i-divide 64->(quotient,remainder). For floating point I am thinking about something else entirely. There is a NaN propagation mode specified in IEEE that lets you run a chain of FP ops and then check for NaN at the end, with the guarantee that the intervening ops will be NaN-preserving. You can't store the results b...
2008 Mar 31
3
[LLVMdev] Reference Manual Clarifications
...require two operands". Binary Operations: Replace "The result value of a binary operator is not necessarily the same type as its operands" with "The result value has the same type as its operands". udiv/sdiv Instruction: Add "rounded towards zero" after "quotient of the two operands". urem Instruction: Remove "regardless of whether the arguments are unsigned or not" because it doesn't make sense. Using urem instead of srem asserts that the arguments are unsigned. urem/srem Instruction: Move remainder/modulo discussion from srem to u...
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