Home
last modified time | relevance | path

Searched refs:denominator (Results 1 – 25 of 68) sorted by relevance

123

/external/apache-commons-math/src/main/java/org/apache/commons/math/fraction/
DFraction.java87 private final int denominator; field in Fraction
189 this.denominator = 1; in Fraction()
232 this.denominator = (int) q2; in Fraction()
235 this.denominator = (int) q1; in Fraction()
282 this.denominator = den; in Fraction()
306 long nOd = ((long) numerator) * object.denominator; in compareTo()
307 long dOn = ((long) denominator) * object.numerator; in compareTo()
318 return (double)numerator / (double)denominator; in doubleValue()
340 (denominator == rhs.denominator); in equals()
360 return denominator; in getDenominator()
[all …]
DBigFraction.java92 private final BigInteger denominator; field in BigFraction
127 denominator = BigInteger.ONE; in BigFraction()
145 denominator = den; in BigFraction()
199 denominator = BigInteger.ZERO.flipBit(-k); in BigFraction()
202 denominator = BigInteger.ONE; in BigFraction()
282 denominator = BigInteger.ONE; in BigFraction()
327 denominator = BigInteger.valueOf(q2); in BigFraction()
330 denominator = BigInteger.valueOf(q1); in BigFraction()
431 final int denominator) { in getReducedFraction() argument
436 return new BigFraction(numerator, denominator); in getReducedFraction()
[all …]
/external/v8/src/
Dbignum-dtoa.cc38 Bignum* denominator,
48 Bignum* numerator, Bignum* denominator,
52 static void GenerateShortestDigits(Bignum* numerator, Bignum* denominator,
58 Bignum* numerator, Bignum* denominator,
65 Bignum* numerator, Bignum* denominator,
95 Bignum denominator; in BignumDtoa() local
105 &numerator, &denominator, in BignumDtoa()
109 &numerator, &denominator, in BignumDtoa()
115 GenerateShortestDigits(&numerator, &denominator, in BignumDtoa()
121 &numerator, &denominator, in BignumDtoa()
[all …]
/external/guava/guava-gwt/src-super/com/google/common/math/super/com/google/common/math/
DLongMath.java233 long denominator = 1; in binomial() local
247 denominator *= i; in binomial()
252 result = multiplyFraction(result, numerator, denominator); in binomial()
254 denominator = i; in binomial()
258 return multiplyFraction(result, numerator, denominator); in binomial()
266 static long multiplyFraction(long x, long numerator, long denominator) { in multiplyFraction() argument
268 return numerator / denominator; in multiplyFraction()
270 long commonDivisor = gcd(x, denominator); in multiplyFraction()
272 denominator /= commonDivisor; in multiplyFraction()
275 return x * (numerator / denominator); in multiplyFraction()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
DGrego.java181 public static long floorDivide(long numerator, long denominator) { in floorDivide() argument
185 numerator / denominator : in floorDivide()
186 ((numerator + 1) / denominator) - 1; in floorDivide()
189 private static long floorDivide(long numerator, long denominator, long[] remainder) { in floorDivide() argument
191 remainder[0] = numerator % denominator; in floorDivide()
192 return numerator / denominator; in floorDivide()
194 long quotient = ((numerator + 1) / denominator) - 1; in floorDivide()
195 remainder[0] = numerator - (quotient * denominator); in floorDivide()
/external/clang/test/CodeGen/
Dexceptions-seh.c4 void try_body(int numerator, int denominator, int *myres) { in try_body() argument
5 *myres = numerator / denominator; in try_body()
12 int safe_div(int numerator, int denominator, int *res) { in safe_div() argument
16 try_body(numerator, denominator, &myres); in safe_div()
/external/guava/guava/src/com/google/common/math/
DLongMath.java678 long denominator = 1;
692 denominator *= i;
697 result = multiplyFraction(result, numerator, denominator);
699 denominator = i;
703 return multiplyFraction(result, numerator, denominator);
711 static long multiplyFraction(long x, long numerator, long denominator) {
713 return numerator / denominator;
715 long commonDivisor = gcd(x, denominator);
717 denominator /= commonDivisor;
720 return x * (numerator / denominator);
/external/libexif/libexif/
Dexif-entry.c296 r.denominator = (ExifLong) sr.denominator; in exif_entry_fix()
329 sr.denominator = (ExifLong) r.denominator; in exif_entry_fix()
539 if (v_rat.denominator) { in exif_entry_format_value()
546 int decimals = (int)(log10(v_rat.denominator)-0.08+1.0); in exif_entry_format_value()
550 (double) v_rat.denominator); in exif_entry_format_value()
554 (unsigned long) v_rat.denominator); in exif_entry_format_value()
568 if (v_srat.denominator) { in exif_entry_format_value()
569 int decimals = (int)(log10(fabs(v_srat.denominator))-0.08+1.0); in exif_entry_format_value()
573 (double) v_srat.denominator); in exif_entry_format_value()
577 (long) v_srat.denominator); in exif_entry_format_value()
[all …]
Dexif-utils.c182 r.denominator = buf ? exif_get_slong (buf + 4, order) : 0; in exif_get_srational()
193 r.denominator = buf ? exif_get_long (buf + 4, order) : 0; in exif_get_rational()
204 exif_set_long (buf + 4, order, value.denominator); in exif_set_rational()
213 exif_set_slong (buf + 4, order, value.denominator); in exif_set_srational()
Dexif-utils.h60 typedef struct {ExifLong numerator; ExifLong denominator;} ExifRational; member
65 typedef struct {ExifSLong numerator; ExifSLong denominator;} ExifSRational; member
/external/icu/icu4c/source/i18n/
Dgregoimp.h39 static int32_t floorDivide(int32_t numerator, int32_t denominator);
50 static inline double floorDivide(double numerator, double denominator);
67 static int32_t floorDivide(double numerator, int32_t denominator,
254 inline double ClockMath::floorDivide(double numerator, double denominator) { in floorDivide() argument
255 return uprv_floor(numerator / denominator); in floorDivide()
Dgregoimp.cpp27 int32_t ClockMath::floorDivide(int32_t numerator, int32_t denominator) { in floorDivide() argument
29 numerator / denominator : ((numerator + 1) / denominator) - 1; in floorDivide()
32 int32_t ClockMath::floorDivide(double numerator, int32_t denominator, in floorDivide() argument
35 quotient = uprv_floor(numerator / denominator); in floorDivide()
36 remainder = (int32_t) (numerator - (quotient * denominator)); in floorDivide()
/external/libexif/libexif/fuji/
Dmnote-fuji-entry.c262 if (!vr.denominator) break; in mnote_fuji_entry_get_value()
264 vr.denominator); in mnote_fuji_entry_get_value()
286 if (!vr.denominator) break; in mnote_fuji_entry_get_value()
288 vr.denominator); in mnote_fuji_entry_get_value()
292 if (!vsr.denominator) break; in mnote_fuji_entry_get_value()
294 vsr.denominator); in mnote_fuji_entry_get_value()
/external/apache-commons-math/src/main/java/org/apache/commons/math/analysis/interpolation/
DDividedDifferenceInterpolator.java105 final double denominator = x[j+i] - x[j]; in computeDividedDifference() local
106 if (denominator == 0.0) { in computeDividedDifference()
110 divdiff[j] = (divdiff[j+1] - divdiff[j]) / denominator; in computeDividedDifference()
/external/jhead/
Dexif.c468 unsigned int *denominator) { in float2urat() argument
471 *denominator = 1; in float2urat()
477 *denominator = 1; in float2urat()
486 *denominator = 1; in float2urat()
489 *denominator = max; in float2urat()
506 *denominator = d; in float2urat()
514 *denominator = 1; in float2urat()
518 unsigned int *denominator) { in ConvertDoubleToURational() argument
519 float2urat(value, 0xFFFFFFFFU, numerator, denominator); in ConvertDoubleToURational()
523 int *denominator) { in ConvertDoubleToSRational() argument
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DNFSubstitution.java1452 double denominator; field in NumeratorSubstitution
1469 double denominator, in NumeratorSubstitution() argument
1478 this.denominator = denominator; in NumeratorSubstitution()
1501 return denominator == that2.denominator; in equals()
1531 while ((nf *= 10) < denominator) { in doSubstitution()
1561 return Math.round(number * denominator); in transformNumber()
1570 return Math.round(number * denominator); in transformNumber()
1659 return denominator; in calcUpperBound()
/external/apache-commons-math/src/main/java/org/apache/commons/math/analysis/solvers/
DMullerSolver.java369 final double denominator; in solve2() local
374 denominator = FastMath.abs(dplus) > FastMath.abs(dminus) ? dplus : dminus; in solve2()
377 denominator = FastMath.sqrt(b * b - delta); in solve2()
379 if (denominator != 0) { in solve2()
380 x = x2 - 2.0 * c * (x2 - x1) / denominator; in solve2()
DLaguerreSolver.java380 Complex denominator = null; in solve() local
419 denominator = dplus.abs() > dminus.abs() ? dplus : dminus; in solve()
422 if (denominator.equals(new Complex(0.0, 0.0))) { in solve()
428 z = z.subtract(N.divide(denominator)); in solve()
/external/apache-commons-math/src/main/java/org/apache/commons/math/complex/
DComplex.java227 double denominator = c * q + d; in divide() local
228 return createComplex((real * q + imaginary) / denominator, in divide()
229 (imaginary * q - real) / denominator); in divide()
232 double denominator = d * q + c; in divide() local
233 return createComplex((imaginary * q + real) / denominator, in divide()
234 (imaginary - real * q) / denominator); in divide()
/external/skia/src/pathops/
DSkPathOpsConic.cpp77 double denominator = conic_eval_denominator(fWeight, t); in ptAtT() local
79 conic_eval_numerator(&fPts[0].fX, fWeight, t) / denominator, in ptAtT()
80 conic_eval_numerator(&fPts[0].fY, fWeight, t) / denominator in ptAtT()
/external/libvpx/libvpx/
Divfdec.c57 input_ctx->framerate.denominator = mem_get_le32(raw_hdr + 20); in file_is_ivf()
59 &input_ctx->framerate.denominator); in file_is_ivf()
/external/libexif/libexif/olympus/
Dmnote-olympus-entry.c79 #define R2L(n) ((n).denominator ? (long)(n).numerator/(n).denominator : 0L)
80 #define R2D(n) ((n).denominator ? (double)(n).numerator/(n).denominator : 0.0)
387 if (!vr.numerator || !vr.denominator) { in mnote_olympus_entry_get_value()
456 if (!vr.numerator || !vr.denominator) { in mnote_olympus_entry_get_value()
688 if (!vr.numerator || !vr.denominator) { in mnote_olympus_entry_get_value()
692 unsigned long tmp = vr.numerator / vr.denominator; in mnote_olympus_entry_get_value()
796 if (!vr.denominator) { in mnote_olympus_entry_get_value()
806 if (!vsr.denominator) { in mnote_olympus_entry_get_value()
/external/libyuv/files/source/
Dmjpeg_decoder.cc169 static int DivideAndRoundUp(int numerator, int denominator) { in DivideAndRoundUp() argument
170 return (numerator + denominator - 1) / denominator; in DivideAndRoundUp()
173 static int DivideAndRoundDown(int numerator, int denominator) { in DivideAndRoundDown() argument
174 return numerator / denominator; in DivideAndRoundDown()
/external/libvpx/libvpx/third_party/libyuv/source/
Dmjpeg_decoder.cc158 static int DivideAndRoundUp(int numerator, int denominator) { in DivideAndRoundUp() argument
159 return (numerator + denominator - 1) / denominator; in DivideAndRoundUp()
162 static int DivideAndRoundDown(int numerator, int denominator) { in DivideAndRoundDown() argument
163 return numerator / denominator; in DivideAndRoundDown()
/external/llvm/test/Transforms/LICM/
Dspeculate.ll3 ; UDiv is safe to speculate if the denominator is known non-zero.
35 ; UDiv is unsafe to speculate if the denominator is not known non-zero.
67 ; SDiv is safe to speculate if the denominator is known non-zero and
101 ; SDiv is unsafe to speculate if the denominator is not known non-zero.
134 ; SDiv is unsafe to speculate if the denominator is not known to have a zero bit.

123