Home
last modified time | relevance | path

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

12345678

/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.cc36 Bignum* denominator,
46 Bignum* numerator, Bignum* denominator,
50 static void GenerateShortestDigits(Bignum* numerator, Bignum* denominator,
56 Bignum* numerator, Bignum* denominator,
63 Bignum* numerator, Bignum* denominator,
93 Bignum denominator; in BignumDtoa() local
103 &numerator, &denominator, in BignumDtoa()
107 &numerator, &denominator, in BignumDtoa()
113 GenerateShortestDigits(&numerator, &denominator, in BignumDtoa()
119 &numerator, &denominator, in BignumDtoa()
[all …]
/external/icu/icu4c/source/i18n/
Ddouble-conversion-bignum-dtoa.cpp72 Bignum* denominator,
82 Bignum* numerator, Bignum* denominator,
86 static void GenerateShortestDigits(Bignum* numerator, Bignum* denominator,
92 Bignum* numerator, Bignum* denominator,
99 Bignum* numerator, Bignum* denominator,
144 Bignum denominator; in BignumDtoa() local
154 &numerator, &denominator, in BignumDtoa()
158 &numerator, &denominator, in BignumDtoa()
165 GenerateShortestDigits(&numerator, &denominator, in BignumDtoa()
171 &numerator, &denominator, in BignumDtoa()
[all …]
Dgregoimp.cpp25 int32_t ClockMath::floorDivide(int32_t numerator, int32_t denominator) { in floorDivide() argument
27 numerator / denominator : ((numerator + 1) / denominator) - 1; in floorDivide()
30 int64_t ClockMath::floorDivide(int64_t numerator, int64_t denominator) { in floorDivide() argument
32 numerator / denominator : ((numerator + 1) / denominator) - 1; in floorDivide()
35 int32_t ClockMath::floorDivide(double numerator, int32_t denominator, in floorDivide() argument
38 quotient = uprv_floor(numerator / denominator); in floorDivide()
39 remainder = (int32_t) (numerator - (quotient * denominator)); in floorDivide()
Dgregoimp.h41 static int32_t floorDivide(int32_t numerator, int32_t denominator);
52 static int64_t floorDivide(int64_t numerator, int64_t denominator);
63 static inline double floorDivide(double numerator, double denominator);
80 static int32_t floorDivide(double numerator, int32_t denominator,
267 inline double ClockMath::floorDivide(double numerator, double denominator) { in floorDivide() argument
268 return uprv_floor(numerator / denominator); in floorDivide()
/external/tensorflow/tensorflow/stream_executor/lib/
Dmathutil.h35 IntegralType denominator) { in CeilOfRatio() argument
36 return CeilOrFloorOfRatio<IntegralType, true>(numerator, denominator); in CeilOfRatio()
40 IntegralType denominator) { in FloorOfRatio() argument
41 return CeilOrFloorOfRatio<IntegralType, false>(numerator, denominator); in FloorOfRatio()
45 IntegralType denominator);
58 IntegralType denominator) { in CeilOrFloorOfRatio() argument
61 assert(denominator != 0); in CeilOrFloorOfRatio()
66 denominator != -1); in CeilOrFloorOfRatio()
68 const IntegralType rounded_toward_zero = numerator / denominator; in CeilOrFloorOfRatio()
69 const IntegralType intermediate_product = rounded_toward_zero * denominator; in CeilOrFloorOfRatio()
[all …]
/external/python/cpython3/Lib/
Dfractions.py84 def __new__(cls, numerator=0, denominator=None, *, _normalize=True): argument
117 if denominator is None:
125 self._denominator = numerator.denominator
142 denominator = int(denom)
144 denominator = 1
149 denominator *= scale
156 denominator *= 10**-exp
164 elif type(numerator) is int is type(denominator):
168 isinstance(denominator, numbers.Rational)):
169 numerator, denominator = (
[all …]
/external/python/cpython2/Lib/
Dfractions.py68 def __new__(cls, numerator=0, denominator=None): argument
101 if denominator is None:
104 self._denominator = numerator.denominator
129 denominator = int(denom)
131 denominator = 1
136 denominator *= scale
143 denominator *= 10**-exp
152 isinstance(denominator, Rational)):
153 numerator, denominator = (
154 numerator.numerator * denominator.denominator,
[all …]
/external/tensorflow/tensorflow/core/lib/math/
Dmath_util.h52 IntegralType denominator) { in CeilOfRatio() argument
53 return CeilOrFloorOfRatio<IntegralType, true>(numerator, denominator); in CeilOfRatio()
57 IntegralType denominator) { in FloorOfRatio() argument
58 return CeilOrFloorOfRatio<IntegralType, false>(numerator, denominator); in FloorOfRatio()
63 IntegralType denominator);
99 IntegralType denominator) { in CeilOrFloorOfRatio() argument
100 DCHECK_NE(0, denominator) << "Division by zero is not supported."; in CeilOrFloorOfRatio()
102 const IntegralType rounded_toward_zero = numerator / denominator; in CeilOrFloorOfRatio()
103 const IntegralType intermediate_product = rounded_toward_zero * denominator; in CeilOrFloorOfRatio()
118 ((denominator > 0 && numerator > intermediate_product) || in CeilOrFloorOfRatio()
[all …]
Dmath_util_test.cc38 const IntegralType denominator = test_data[i][1]; in TestCeilOfRatio() local
42 IntegralType floor_1 = MathUtil::FloorOfRatio(numerator, denominator); in TestCeilOfRatio()
44 numerator, denominator); in TestCeilOfRatio()
48 << ", denominator = " << denominator << " " in TestCeilOfRatio()
50 IntegralType ceil_1 = MathUtil::CeilOfRatio(numerator, denominator); in TestCeilOfRatio()
52 numerator, denominator); in TestCeilOfRatio()
56 << ", denominator = " << denominator << " " in TestCeilOfRatio()
146 IntegralType denominator) { in CeilOfRatioDenomMinusOne() argument
148 return (numerator + denominator - kOne) / denominator; in CeilOfRatioDenomMinusOne()
155 IntegralType denominator) { in FloorOfRatioByDivision() argument
[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/tensorflow/tensorflow/contrib/rate/
Drate.py65 def build(self, values, denominator): argument
77 name="denom", shape=denominator.get_shape(), dtype=dtypes.float64)
82 shape=denominator.get_shape(),
123 def call(self, values, denominator): argument
133 if denominator.dtype != dtypes.float64:
134 denominator = math_ops.cast(denominator, dtypes.float64)
140 math_ops.subtract(denominator, self.prev_denominator))
142 state_ops.assign(self.prev_denominator, denominator)
/external/libtextclassifier/lang_id/common/math/
Dsoftmax.cc44 float denominator = 1.0f; // Contribution of i == label. in ComputeSoftmaxProbability() local
68 denominator += VeryFastExp(delta_score); in ComputeSoftmaxProbability()
70 return 1.0f / denominator; in ComputeSoftmaxProbability()
86 float denominator = 0; in ComputeSoftmax() local
93 denominator += exp_score; in ComputeSoftmax()
97 softmax.push_back(exp_scores[i] / denominator); in ComputeSoftmax()
/external/icu/android_icu4j/src/main/java/android/icu/impl/
DGrego.java185 public static long floorDivide(long numerator, long denominator) { in floorDivide() argument
189 numerator / denominator : in floorDivide()
190 ((numerator + 1) / denominator) - 1; in floorDivide()
193 private static long floorDivide(long numerator, long denominator, long[] remainder) { in floorDivide() argument
195 remainder[0] = numerator % denominator; in floorDivide()
196 return numerator / denominator; in floorDivide()
198 long quotient = ((numerator + 1) / denominator) - 1; in floorDivide()
199 remainder[0] = numerator - (quotient * denominator); in floorDivide()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
DGrego.java183 public static long floorDivide(long numerator, long denominator) { in floorDivide() argument
187 numerator / denominator : in floorDivide()
188 ((numerator + 1) / denominator) - 1; in floorDivide()
191 private static long floorDivide(long numerator, long denominator, long[] remainder) { in floorDivide() argument
193 remainder[0] = numerator % denominator; in floorDivide()
194 return numerator / denominator; in floorDivide()
196 long quotient = ((numerator + 1) / denominator) - 1; in floorDivide()
197 remainder[0] = numerator - (quotient * denominator); in floorDivide()
/external/libtextclassifier/utils/math/
Dsoftmax.cc43 float denominator = 1.0f; // Contribution of i == label. in ComputeSoftmaxProbability() local
67 denominator += VeryFastExp(delta_score); in ComputeSoftmaxProbability()
69 return 1.0f / denominator; in ComputeSoftmaxProbability()
88 float denominator = 0; in ComputeSoftmax() local
95 denominator += exp_score; in ComputeSoftmax()
99 softmax.push_back(exp_scores[i] / denominator); in ComputeSoftmax()
/external/clang/test/CodeGen/
Dexceptions-seh.c10 void try_body(int numerator, int denominator, int *myres) { in try_body() argument
11 *myres = numerator / denominator; in try_body()
18 int safe_div(int numerator, int denominator, int *res) { in safe_div() argument
22 try_body(numerator, denominator, &myres); in safe_div()
/external/protobuf/src/google/protobuf/stubs/
Dint128.cc101 uint128 denominator = divisor; in DivModImpl() local
106 int shift = Fls128(dividend) - Fls128(denominator); in DivModImpl()
107 denominator <<= shift; in DivModImpl()
113 if (dividend >= denominator) { in DivModImpl()
114 dividend -= denominator; in DivModImpl()
118 denominator >>= 1; in DivModImpl()
/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/tensorflow/tensorflow/compiler/xla/service/llvm_ir/
Dmath_ops.cc48 llvm::Value* denominator = llvm::ConstantFP::get(type, denominator_coeffs[0]); in EmitFastTanh() local
50 denominator = in EmitFastTanh()
51 b->CreateFAdd(b->CreateFMul(input_squared, denominator), in EmitFastTanh()
55 return b->CreateFDiv(numerator, denominator); in EmitFastTanh()
/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 …]
/external/piex/src/tiff_directory/
Dtiff_directory.cc132 my_value[c].denominator = 1; in Get()
137 my_value[c].denominator = 1; in Get()
142 my_value[c].denominator = in Get()
144 if (my_value[c].denominator == 0) { in Get()
187 my_value[c].denominator = 1; in Get()
192 my_value[c].denominator = 1; in Get()
197 my_value[c].denominator = in Get()
199 if (my_value[c].denominator == 0) { in Get()
/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/ltp/testcases/kernel/device-drivers/v4l/user_space/
Dtest_VIDIOC_PARM.c111 parm.parm.capture.timeperframe.denominator, in do_get_param()
130 denominator != 0); in do_get_param()
136 denominator != 0); in do_get_param()
160 parm.parm.output.timeperframe.denominator, in do_get_param()
178 denominator != 0); in do_get_param()
184 denominator != 0); in do_get_param()

12345678