Home
last modified time | relevance | path

Searched refs:numerator (Results 1 – 25 of 203) sorted by relevance

123456789

/external/v8/src/
Dbignum-dtoa.cc35 Bignum* numerator,
46 Bignum* numerator, Bignum* denominator,
50 static void GenerateShortestDigits(Bignum* numerator, Bignum* denominator,
56 Bignum* numerator, Bignum* denominator,
63 Bignum* numerator, Bignum* denominator,
92 Bignum numerator; 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.cpp71 Bignum* numerator,
82 Bignum* numerator, Bignum* denominator,
86 static void GenerateShortestDigits(Bignum* numerator, Bignum* denominator,
92 Bignum* numerator, Bignum* denominator,
99 Bignum* numerator, Bignum* denominator,
143 Bignum numerator; 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
26 return (numerator >= 0) ? in floorDivide()
27 numerator / denominator : ((numerator + 1) / denominator) - 1; in floorDivide()
30 int64_t ClockMath::floorDivide(int64_t numerator, int64_t denominator) { in floorDivide() argument
31 return (numerator >= 0) ? in floorDivide()
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/apache-commons-math/src/main/java/org/apache/commons/math/fraction/
DFraction.java90 private final int numerator; field in Fraction
188 this.numerator = (int) a0; in Fraction()
231 this.numerator = (int) p2; in Fraction()
234 this.numerator = (int) p1; in Fraction()
281 this.numerator = num; in Fraction()
291 if (numerator >= 0) { in abs()
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()
339 return (numerator == rhs.numerator) && in equals()
[all …]
DBigFraction.java89 private final BigInteger numerator; field in BigFraction
126 numerator = BigInteger.ZERO; in BigFraction()
144 numerator = num; in BigFraction()
198 numerator = BigInteger.valueOf(m); in BigFraction()
201 numerator = BigInteger.valueOf(m).multiply(BigInteger.ZERO.flipBit(k)); in BigFraction()
281 numerator = BigInteger.valueOf(a0); in BigFraction()
326 numerator = BigInteger.valueOf(p2); in BigFraction()
329 numerator = BigInteger.valueOf(p1); in BigFraction()
430 public static BigFraction getReducedFraction(final int numerator, in getReducedFraction() argument
432 if (numerator == 0) { in getReducedFraction()
[all …]
/external/python/cpython3/Lib/
Dfractions.py84 def __new__(cls, numerator=0, denominator=None, *, _normalize=True): argument
118 if type(numerator) is int:
119 self._numerator = numerator
123 elif isinstance(numerator, numbers.Rational):
124 self._numerator = numerator.numerator
125 self._denominator = numerator.denominator
128 elif isinstance(numerator, (float, Decimal)):
130 self._numerator, self._denominator = numerator.as_integer_ratio()
133 elif isinstance(numerator, str):
135 m = _RATIONAL_FORMAT.match(numerator)
[all …]
/external/python/cpython2/Lib/
Dfractions.py68 def __new__(cls, numerator=0, denominator=None): argument
102 if isinstance(numerator, Rational):
103 self._numerator = numerator.numerator
104 self._denominator = numerator.denominator
107 elif isinstance(numerator, float):
109 value = Fraction.from_float(numerator)
114 elif isinstance(numerator, Decimal):
115 value = Fraction.from_decimal(numerator)
120 elif isinstance(numerator, basestring):
122 m = _RATIONAL_FORMAT.match(numerator)
[all …]
/external/tensorflow/tensorflow/stream_executor/lib/
Dmathutil.h34 static IntegralType CeilOfRatio(IntegralType numerator, in CeilOfRatio() argument
36 return CeilOrFloorOfRatio<IntegralType, true>(numerator, denominator); in CeilOfRatio()
39 static IntegralType FloorOfRatio(IntegralType numerator, in FloorOfRatio() argument
41 return CeilOrFloorOfRatio<IntegralType, false>(numerator, denominator); in FloorOfRatio()
44 static IntegralType CeilOrFloorOfRatio(IntegralType numerator,
57 IntegralType MathUtil::CeilOrFloorOfRatio(IntegralType numerator, in CeilOrFloorOfRatio() argument
65 numerator != std::numeric_limits<IntegralType>::min() || in CeilOrFloorOfRatio()
68 const IntegralType rounded_toward_zero = numerator / denominator; in CeilOrFloorOfRatio()
82 ((denominator > 0 && numerator > intermediate_product) || in CeilOrFloorOfRatio()
83 (denominator < 0 && numerator < intermediate_product)); in CeilOrFloorOfRatio()
[all …]
/external/tensorflow/tensorflow/core/lib/math/
Dmath_util.h51 static IntegralType CeilOfRatio(IntegralType numerator, in CeilOfRatio() argument
53 return CeilOrFloorOfRatio<IntegralType, true>(numerator, denominator); in CeilOfRatio()
56 static IntegralType FloorOfRatio(IntegralType numerator, in FloorOfRatio() argument
58 return CeilOrFloorOfRatio<IntegralType, false>(numerator, denominator); in FloorOfRatio()
62 static IntegralType CeilOrFloorOfRatio(IntegralType numerator,
98 IntegralType MathUtil::CeilOrFloorOfRatio(IntegralType numerator, in CeilOrFloorOfRatio() argument
102 const IntegralType rounded_toward_zero = numerator / denominator; in CeilOrFloorOfRatio()
118 ((denominator > 0 && numerator > intermediate_product) || in CeilOrFloorOfRatio()
119 (denominator < 0 && numerator < intermediate_product)); in CeilOrFloorOfRatio()
127 ((denominator > 0 && numerator < intermediate_product) || in CeilOrFloorOfRatio()
[all …]
Dmath_util_test.cc37 const IntegralType numerator = test_data[i][0]; in TestCeilOfRatio() local
42 IntegralType floor_1 = MathUtil::FloorOfRatio(numerator, denominator); in TestCeilOfRatio()
44 numerator, denominator); in TestCeilOfRatio()
47 << "FloorOfRatio fails with numerator = " << numerator in TestCeilOfRatio()
50 IntegralType ceil_1 = MathUtil::CeilOfRatio(numerator, denominator); in TestCeilOfRatio()
52 numerator, denominator); in TestCeilOfRatio()
55 << "CeilOfRatio fails with numerator = " << numerator in TestCeilOfRatio()
145 static IntegralType CeilOfRatioDenomMinusOne(IntegralType numerator, in CeilOfRatioDenomMinusOne() argument
148 return (numerator + denominator - kOne) / denominator; in CeilOfRatioDenomMinusOne()
154 static IntegralType FloorOfRatioByDivision(IntegralType numerator, in FloorOfRatioByDivision() argument
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/impl/
DGrego.java185 public static long floorDivide(long numerator, long denominator) { in floorDivide() argument
188 return (numerator >= 0) ? in floorDivide()
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
194 if (numerator >= 0) { in floorDivide()
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
186 return (numerator >= 0) ? in floorDivide()
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
192 if (numerator >= 0) { in floorDivide()
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/tensorflow/tensorflow/compiler/xla/service/llvm_ir/
Dmath_ops.cc40 llvm::Value* numerator = llvm::ConstantFP::get(type, numerator_coeffs[0]); in EmitFastTanh() local
42 numerator = b->CreateFAdd(b->CreateFMul(input_squared, numerator), in EmitFastTanh()
46 numerator = b->CreateFMul(input_clamped, numerator); in EmitFastTanh()
55 return b->CreateFDiv(numerator, denominator); in EmitFastTanh()
/external/guava/guava-gwt/src-super/com/google/common/math/super/com/google/common/math/
DLongMath.java232 long numerator = n--; in binomial() local
246 numerator *= n; in binomial()
252 result = multiplyFraction(result, numerator, denominator); in binomial()
253 numerator = n; 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()
275 return x * (numerator / denominator); in multiplyFraction()
/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/boringssl/src/crypto/fipsmodule/bn/
Ddiv.c195 int BN_div(BIGNUM *quotient, BIGNUM *rem, const BIGNUM *numerator, in BN_div() argument
209 int numerator_width = bn_minimal_width(numerator); in BN_div()
211 if ((numerator_width > 0 && numerator->d[numerator_width - 1] == 0) || in BN_div()
244 if (!BN_lshift(snum, numerator, norm_shift)) { in BN_div()
290 res->neg = (numerator->neg ^ divisor->neg); in BN_div()
385 int neg = numerator->neg; in BN_div()
460 const BIGNUM *numerator, const BIGNUM *divisor, in bn_div_consttime() argument
462 if (BN_is_negative(numerator) || BN_is_negative(divisor)) { in bn_div_consttime()
478 if (quotient == NULL || quotient == numerator || quotient == divisor) { in bn_div_consttime()
481 if (remainder == NULL || remainder == numerator || remainder == divisor) { in bn_div_consttime()
[all …]
/external/guava/guava/src/com/google/common/math/
DLongMath.java677 long numerator = n--;
691 numerator *= n;
697 result = multiplyFraction(result, numerator, denominator);
698 numerator = n;
703 return multiplyFraction(result, numerator, denominator);
711 static long multiplyFraction(long x, long numerator, long denominator) {
713 return numerator / denominator;
720 return x * (numerator / denominator);
/external/eigen/unsupported/Eigen/CXX11/src/Tensor/
DTensorIntDiv.h164 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T divide(const T numerator) const {
165 …eigen_assert(static_cast<typename UnsignedTraits<T>::type>(numerator) < NumTraits<UnsignedType>::h…
168 UnsignedType t1 = muluh(multiplier, numerator);
169 UnsignedType t = (static_cast<UnsignedType>(numerator) - t1) >> shift1;
245 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T operator / (const T& numerator, const TensorIntDivis…
246 return divisor.divide(numerator);
/external/libexif/libexif/
Dexif-entry.c295 r.numerator = (ExifLong) sr.numerator; in exif_entry_fix()
328 sr.numerator = (ExifLong) r.numerator; in exif_entry_fix()
549 (double) v_rat.numerator / in exif_entry_format_value()
553 (unsigned long) v_rat.numerator, in exif_entry_format_value()
572 (double) v_srat.numerator / in exif_entry_format_value()
576 (long) v_srat.numerator, in exif_entry_format_value()
1011 d = (double) v_rat.numerator / (double) v_rat.denominator; in exif_entry_get_value()
1019 if (!v_rat.denominator || (0x80000000 == v_rat.numerator)) { in exif_entry_get_value()
1023 d = (double) v_rat.numerator / (double) v_rat.denominator; in exif_entry_get_value()
1060 (int) (d * (double) v_rat.numerator / in exif_entry_get_value()
[all …]
/external/piex/src/tiff_directory/
Dtiff_directory.cc131 my_value[c].numerator = Get16u(value_ptr + c * 2, is_big_endian, &err); in Get()
136 my_value[c].numerator = Get32u(value_ptr + c * 4, is_big_endian, &err); in Get()
141 my_value[c].numerator = Get32u(value_ptr + c * 8, is_big_endian, &err); in Get()
186 my_value[c].numerator = Get16s(value_ptr + c * 2, is_big_endian, &err); in Get()
191 my_value[c].numerator = Get32s(value_ptr + c * 4, is_big_endian, &err); in Get()
196 my_value[c].numerator = Get32s(value_ptr + c * 8, is_big_endian, &err); in Get()
/external/webrtc/webrtc/modules/audio_coding/neteq/
Dstatistics_calculator.cc282 uint16_t StatisticsCalculator::CalculateQ14Ratio(size_t numerator, in CalculateQ14Ratio() argument
284 if (numerator == 0) { in CalculateQ14Ratio()
286 } else if (numerator < denominator) { in CalculateQ14Ratio()
288 assert((numerator << 14) / denominator < (1 << 14)); in CalculateQ14Ratio()
289 return static_cast<uint16_t>((numerator << 14) / denominator); in CalculateQ14Ratio()
/external/webrtc/webrtc/modules/audio_coding/codecs/ilbc/
Dstate_construct.c38 int16_t numerator[1+LPC_FILTERORDER]; in WebRtcIlbcfix_StateConstruct() local
48 numerator[k] = syntDenum[LPC_FILTERORDER-k]; in WebRtcIlbcfix_StateConstruct()
99 numerator, LPC_FILTERORDER+1, len + LPC_FILTERORDER); in WebRtcIlbcfix_StateConstruct()
Dstate_search.c44 int16_t numerator[1+LPC_FILTERORDER]; in WebRtcIlbcfix_StateSearch() local
56 numerator[i] = (syntDenum[LPC_FILTERORDER-i]>>scaleRes); in WebRtcIlbcfix_StateSearch()
67 WebRtcSpl_FilterMAFastQ12(residualLong, sampleMa, numerator, in WebRtcIlbcfix_StateSearch()
/external/swiftshader/third_party/llvm-7.0/llvm/test/Transforms/CodeGenPrepare/NVPTX/
Dbypass-slow-div-constant-numerator.ll6 ; When we bypass slow div with a constant numerator which fits into the bypass
7 ; width, we still emit the bypass code, but we don't 'or' the numerator with
20 ; When we try to bypass slow div with a constant numerator which *doesn't* fit

123456789