/external/python/cpython2/Lib/ |
D | fpformat.py | 43 sign, intpart, fraction, exppart = res.group(1,2,3,4) 46 if fraction: fraction = fraction[1:] 49 return sign, intpart, fraction, expo 51 def unexpo(intpart, fraction, expo): argument 54 f = len(fraction) 55 intpart, fraction = intpart + fraction[:expo], fraction[expo:] 60 intpart, fraction = intpart[:expo], intpart[expo:] + fraction 62 fraction = '0'*(-expo-i) + fraction 63 return intpart, fraction 65 def roundfrac(intpart, fraction, digs): argument [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/fraction/ |
D | Fraction.java | 17 package org.apache.commons.math.fraction; 430 public Fraction add(Fraction fraction) { in add() argument 431 return addSub(fraction, true /* add */); in add() 453 public Fraction subtract(Fraction fraction) { in subtract() argument 454 return addSub(fraction, false /* subtract */); in subtract() 476 private Fraction addSub(Fraction fraction, boolean isAdd) { in addSub() argument 477 if (fraction == null) { in addSub() 482 return isAdd ? fraction : fraction.negate(); in addSub() 484 if (fraction.numerator == 0) { in addSub() 489 int d1 = MathUtils.gcd(denominator, fraction.denominator); in addSub() [all …]
|
D | BigFraction.java | 17 package org.apache.commons.math.fraction; 505 public BigFraction add(final BigFraction fraction) { in add() argument 506 if (fraction == null) { in add() 509 if (ZERO.equals(fraction)) { in add() 516 if (denominator.equals(fraction.denominator)) { in add() 517 num = numerator.add(fraction.numerator); in add() 520 … num = (numerator.multiply(fraction.denominator)).add((fraction.numerator).multiply(denominator)); in add() 521 den = denominator.multiply(fraction.denominator); in add() 662 public BigFraction divide(final BigFraction fraction) { in divide() argument 663 if (fraction == null) { in divide() [all …]
|
/external/tensorflow/tensorflow/lite/kernels/internal/ |
D | quantization_util.cc | 146 int64_t fraction = 0x40000000 + ((u & kFractionMask) >> kFractionShift); in IntegerFrExp() local 153 fraction += 1; in IntegerFrExp() 157 fraction *= -1; in IntegerFrExp() 160 return fraction; in IntegerFrExp() 163 double DoubleFromFractionAndShift(int64_t fraction, int shift) { in DoubleFromFractionAndShift() argument 171 if (fraction == 0) { in DoubleFromFractionAndShift() 173 } else if (fraction > 0) { in DoubleFromFractionAndShift() 181 if (fraction == 0) { in DoubleFromFractionAndShift() 186 bool is_negative = (fraction < 0); in DoubleFromFractionAndShift() 187 int64_t encoded_fraction = is_negative ? -fraction : fraction; in DoubleFromFractionAndShift() [all …]
|
D | quantization_util_test.cc | 281 int64_t fraction = IntegerFrExp(3.0, &shift); in TEST() local 282 result = DoubleFromFractionAndShift(fraction, shift); in TEST() 285 fraction = IntegerFrExp(123.45, &shift); in TEST() 286 result = DoubleFromFractionAndShift(fraction, shift); in TEST() 289 fraction = IntegerFrExp(-23.232323, &shift); in TEST() 290 result = DoubleFromFractionAndShift(fraction, shift); in TEST() 293 fraction = IntegerFrExp(NAN, &shift); in TEST() 294 result = DoubleFromFractionAndShift(fraction, shift); in TEST() 297 fraction = IntegerFrExp(INFINITY, &shift); in TEST() 298 result = DoubleFromFractionAndShift(fraction, shift); in TEST()
|
/external/deqp-deps/glslang/SPIRV/ |
D | hex_float.h | 685 uint_type fraction = static_cast<uint_type>((bits & HF::fraction_encode_mask) 688 const bool is_zero = exponent == 0 && fraction == 0; 702 while ((fraction & HF::fraction_top_bit) == 0) { 703 fraction = static_cast<uint_type>(fraction << 1); 708 fraction = static_cast<uint_type>(fraction << 1); // eat the leading 1 709 fraction &= HF::fraction_represent_mask; 715 while (fraction_nibbles > 0 && (fraction & 0xF) == 0) { 717 fraction = static_cast<uint_type>(fraction >> 4); 729 << std::setfill('0') << std::hex << fraction; 893 uint_type fraction = 0; [all …]
|
/external/deqp-deps/SPIRV-Tools/source/util/ |
D | hex_float.h | 755 uint_type fraction = static_cast<uint_type>((bits & HF::fraction_encode_mask) 758 const bool is_zero = exponent == 0 && fraction == 0; 772 while ((fraction & HF::fraction_top_bit) == 0) { 773 fraction = static_cast<uint_type>(fraction << 1); 778 fraction = static_cast<uint_type>(fraction << 1); // eat the leading 1 779 fraction &= HF::fraction_represent_mask; 785 while (fraction_nibbles > 0 && (fraction & 0xF) == 0) { 787 fraction = static_cast<uint_type>(fraction >> 4); 799 << std::setfill('0') << std::hex << fraction; 963 uint_type fraction = 0; [all …]
|
/external/swiftshader/third_party/SPIRV-Tools/source/util/ |
D | hex_float.h | 755 uint_type fraction = static_cast<uint_type>((bits & HF::fraction_encode_mask) 758 const bool is_zero = exponent == 0 && fraction == 0; 772 while ((fraction & HF::fraction_top_bit) == 0) { 773 fraction = static_cast<uint_type>(fraction << 1); 778 fraction = static_cast<uint_type>(fraction << 1); // eat the leading 1 779 fraction &= HF::fraction_represent_mask; 785 while (fraction_nibbles > 0 && (fraction & 0xF) == 0) { 787 fraction = static_cast<uint_type>(fraction >> 4); 799 << std::setfill('0') << std::hex << fraction; 963 uint_type fraction = 0; [all …]
|
/external/skqp/gm/ |
D | stringart.cpp | 68 SkScalar fraction = 1.0f - timer.scaled(2.0f/kDesiredDurationSecs, 2.0f); in onAnimate() local 69 if (fraction <= 0.0f) { in onAnimate() 70 fraction = -fraction; in onAnimate() 73 SkASSERT(fraction >= 0.0f && fraction <= 1.0f); in onAnimate() 75 fNumSteps = (int) (fraction * kMaxNumSteps); in onAnimate()
|
/external/skia/gm/ |
D | stringart.cpp | 68 SkScalar fraction = 1.0f - timer.scaled(2.0f/kDesiredDurationSecs, 2.0f); in onAnimate() local 69 if (fraction <= 0.0f) { in onAnimate() 70 fraction = -fraction; in onAnimate() 73 SkASSERT(fraction >= 0.0f && fraction <= 1.0f); in onAnimate() 75 fNumSteps = (int) (fraction * kMaxNumSteps); in onAnimate()
|
/external/webrtc/webrtc/modules/audio_coding/neteq/ |
D | normal.cc | 133 int fraction = increment; in Process() local 140 static_cast<int16_t>((fraction * (*output)[channel_ix][i] + in Process() 141 (32 - fraction) * expanded[channel_ix][i] + 8) >> 5); in Process() 142 fraction += increment; in Process() 169 int16_t fraction = increment; in Process() local 174 (fraction * signal[i] + (32 - fraction) * cng_output[i] + 8) >> 5; in Process() 175 fraction += increment; in Process()
|
/external/protobuf/src/google/protobuf/stubs/ |
D | mathutil.h | 132 const T fraction, const T margin); 137 const T fraction, const T margin) { in WithinFractionOrMargin() argument 139 GOOGLE_DCHECK((T(0) < fraction || T(0) == fraction) && in WithinFractionOrMargin() 140 fraction < T(1) && in WithinFractionOrMargin() 154 T relative_margin = static_cast<T>(fraction * Max(Abs(x), Abs(y))); in WithinFractionOrMargin()
|
/external/fonttools/Tests/feaLib/data/ |
D | spec5d1.fea | 5 sub [one one.oldstyle] [slash fraction] [two two.oldstyle] by onehalf; 17 sub one fraction two by onehalf; 18 sub one.oldstyle fraction two by onehalf; 21 sub one fraction two.oldstyle by onehalf; 22 sub one.oldstyle fraction two.oldstyle by onehalf;
|
/external/opencensus-java/impl_core/src/main/java/io/opencensus/implcore/stats/ |
D | MutableAggregation.java | 65 abstract void combine(MutableAggregation other, double fraction); in combine() argument 93 void combine(MutableAggregation other, double fraction) { in combine() argument 95 this.sum += fraction * ((MutableSumDouble) other).sum; in combine() 162 void combine(MutableAggregation other, double fraction) { in combine() argument 164 this.count += Math.round(fraction * ((MutableCount) other).getCount()); in combine() 211 void combine(MutableAggregation other, double fraction) { in combine() argument 214 this.count += Math.round(mutableMean.count * fraction); in combine() 215 this.sum += mutableMean.sum * fraction; in combine() 335 void combine(MutableAggregation other, double fraction) { in combine() argument 337 if (Math.abs(1.0 - fraction) > TOLERANCE) { in combine() [all …]
|
/external/tensorflow/tensorflow/contrib/opt/python/training/ |
D | sign_decay.py | 99 fraction = 2.0 * num_periods * completed_fraction 101 1.0 + math_ops.cos(constant_op.constant(math.pi) * fraction)) 104 math_ops.greater_equal(fraction, 2 * zero_after), 0.0, decayed) 150 fraction = num / math_ops.cast(decay_steps, dtypes.float32) 152 1.0 + math_ops.cos(constant_op.constant(math.pi) * fraction))
|
D | sign_decay_test.py | 40 fraction = 2.0 * num_periods * step / float(decay_steps) 41 if zero_after is not None and fraction >= 2 * zero_after: 43 return 0.5 * (1.0 + math.cos(math.pi * fraction)) 53 fraction = ( 57 return 0.5 * (1.0 + math.cos(math.pi * fraction))
|
/external/protobuf/src/google/protobuf/util/ |
D | field_comparator.h | 145 void SetFractionAndMargin(const FieldDescriptor* field, double fraction, 154 void SetDefaultFractionAndMargin(double fraction, double margin); 159 double fraction; member 162 : fraction(0.0), in Tolerance() 165 : fraction(f), in Tolerance()
|
D | field_comparator.cc | 133 void DefaultFieldComparator::SetDefaultFractionAndMargin(double fraction, in SetDefaultFractionAndMargin() argument 135 default_tolerance_ = Tolerance(fraction, margin); in SetDefaultFractionAndMargin() 140 double fraction, in SetFractionAndMargin() argument 146 map_tolerance_[field] = Tolerance(fraction, margin); in SetFractionAndMargin() 195 value_1, value_2, static_cast<T>(tolerance->fraction), in CompareDoubleOrFloat()
|
/external/python/cpython2/Doc/tutorial/ |
D | floatingpoint.rst | 11 fractions. For example, the decimal fraction :: 15 has value 1/10 + 2/100 + 5/1000, and in the same way the binary fraction :: 28 The problem is easier to understand at first in base 10. Consider the fraction 29 1/3. You can approximate that as a base 10 fraction:: 46 decimal value 0.1 cannot be represented exactly as a base 2 fraction. In base 47 2, 1/10 is the infinitely repeating fraction :: 55 number ``0.1`` is the binary fraction :: 62 decimal fraction, because of the way that floats are displayed at the 98 to the nearest value, rounding ties away from zero. Since the decimal fraction 165 fraction. Almost all machines today (July 2010) use IEEE-754 floating point [all …]
|
/external/libcups/cups/ |
D | pwg-media.c | 1060 fraction; /* Fractional portion */ in pwg_format_inches() local 1070 fraction = thousandths % 1000; in pwg_format_inches() 1077 if (fraction == 0) in pwg_format_inches() 1079 else if (fraction % 10) in pwg_format_inches() 1080 snprintf(buf, bufsize, "%d.%03d", integer, fraction); in pwg_format_inches() 1081 else if (fraction % 100) in pwg_format_inches() 1082 snprintf(buf, bufsize, "%d.%02d", integer, fraction / 10); in pwg_format_inches() 1084 snprintf(buf, bufsize, "%d.%01d", integer, fraction / 100); in pwg_format_inches() 1100 fraction; /* Fractional portion */ in pwg_format_millimeters() local 1108 fraction = val % 100; in pwg_format_millimeters() [all …]
|
/external/python/cpython3/Doc/tutorial/ |
D | floatingpoint.rst | 15 fractions. For example, the decimal fraction :: 19 has value 1/10 + 2/100 + 5/1000, and in the same way the binary fraction :: 32 The problem is easier to understand at first in base 10. Consider the fraction 33 1/3. You can approximate that as a base 10 fraction:: 50 decimal value 0.1 cannot be represented exactly as a base 2 fraction. In base 51 2, 1/10 is the infinitely repeating fraction :: 56 machines today, floats are approximated using a binary fraction with 58 with the denominator as a power of two. In the case of 1/10, the binary fraction 78 of 1/10, the actual stored value is the nearest representable binary fraction. 81 nearest approximate binary fraction. For example, the numbers ``0.1`` and [all …]
|
/external/syzkaller/vendor/github.com/google/go-cmp/cmp/cmpopts/ |
D | equate.go | 46 func EquateApprox(fraction, margin float64) cmp.Option { argument 47 if margin < 0 || fraction < 0 || math.IsNaN(margin) || math.IsNaN(fraction) { 50 a := approximator{fraction, margin}
|
/external/arm-optimized-routines/test/rtest/ |
D | semi.c | 619 int fraction = x[0] & 0x007fffff; in test_isnanf() local 620 if ((exponent == 0x7f800000) && (fraction != 0)) out[0] = 1; in test_isnanf() 673 int fraction = (x[0] & 0x000fffff) | x[1]; in test_fpclassify() local 675 if ((exponent == 0x00) && (fraction == 0)) out[0] = 0; in test_fpclassify() 676 else if ((exponent == 0x00) && (fraction != 0)) out[0] = 4; in test_fpclassify() 677 else if ((exponent == 0x7ff) && (fraction == 0)) out[0] = 3; in test_fpclassify() 678 else if ((exponent == 0x7ff) && (fraction != 0)) out[0] = 7; in test_fpclassify() 686 int fraction = x[0] & 0x007fffff; in test_fpclassifyf() local 688 if ((exponent == 0x000) && (fraction == 0)) out[0] = 0; in test_fpclassifyf() 689 else if ((exponent == 0x000) && (fraction != 0)) out[0] = 4; in test_fpclassifyf() [all …]
|
/external/pdfium/core/fxcrt/ |
D | fx_string.cpp | 220 int fraction = scaled % scale; in FX_ftoa() local 221 if (fraction == 0) { in FX_ftoa() 226 while (fraction) { in FX_ftoa() 227 buf[buf_size++] = '0' + fraction / scale; in FX_ftoa() 228 fraction %= scale; in FX_ftoa()
|
/external/harfbuzz_ng/test/shaping/data/in-house/tests/ |
D | automatic-fractions.tests | 1 …44,U+0034,U+0035,U+0036:[one.numr=0+600|two.numr=1+600|three.numr=2+600|fraction=3+252|four.small=… 2 …44,U+0034,U+0035,U+0036:[one.numr=0+600|two.numr=1+600|three.numr=2+600|fraction=3+252|four.small=… 3 …U+0665,U+0666:[uni0661.numr=0+600|uni0662.numr=1+600|uni0663.numr=2+600|fraction=3+252|uni0664.sma…
|