/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/rust/crates/serde_json/src/lexical/ |
D | parse.rs | 38 let fraction = &[]; in parse_concise_float() localVariable 39 bhcomp(b, integer, fraction, mant_exp) in parse_concise_float() 49 pub fn parse_truncated_float<F>(integer: &[u8], mut fraction: &[u8], exponent: i32) -> F in parse_truncated_float() 54 while fraction.last() == Some(&b'0') { in parse_truncated_float() 55 fraction = &fraction[..fraction.len() - 1]; in parse_truncated_float() 61 let mut iter = integer.iter().chain(fraction); in parse_truncated_float() 72 let mant_exp = mantissa_exponent(exponent, fraction.len(), truncated); in parse_truncated_float() 77 fraction, in parse_truncated_float()
|
D | bhcomp.rs | 22 fn parse_mantissa<F>(integer: &[u8], fraction: &[u8]) -> Bigint in parse_mantissa() 36 for &digit in integer.iter().chain(fraction) { in parse_mantissa() 68 if i < integer.len() + fraction.len() { in parse_mantissa() 193 pub(crate) fn bhcomp<F>(b: F, integer: &[u8], mut fraction: &[u8], exponent: i32) -> F in bhcomp() 200 let fraction_digits = fraction.len(); in bhcomp() 202 let start = fraction.iter().take_while(|&x| *x == b'0').count(); in bhcomp() 203 fraction = &fraction[start..]; in bhcomp() 212 let mantissa = parse_mantissa::<F>(integer, fraction); in bhcomp()
|
/external/skia/tests/sksl/intrinsics/ |
D | Modf.glsl | 8 vec4 fraction; 10 fraction.x = modf(value.x, whole.x); 11 ok.x = whole.x == 2.0 && fraction.x == 0.5; 12 fraction.xy = modf(value.xy, whole.xy); 13 ok.y = whole.y == 2.0 && fraction.y == 0.5; 14 fraction.xyz = modf(value.xyz, whole.xyz); 15 ok.z = whole.z == 2.0 && fraction.z == 0.5; 16 fraction = modf(value, whole); 17 ok.w = whole.w == 2.0 && fraction.w == 0.5;
|
D | Modf.metal | 43 float4 fraction; 45 fraction.x = _skOutParamHelper0_modf(value.x, whole); 46 ok.x = whole.x == 2.0 && fraction.x == 0.5; 47 fraction.xy = _skOutParamHelper1_modf(value.xy, whole); 48 ok.y = whole.y == 2.0 && fraction.y == 0.5; 49 fraction.xyz = _skOutParamHelper2_modf(value.xyz, whole); 50 ok.z = whole.z == 2.0 && fraction.z == 0.5; 51 fraction = _skOutParamHelper3_modf(value, whole); 52 ok.w = whole.w == 2.0 && fraction.w == 0.5;
|
D | Modf.asm.frag | 20 OpName %fraction "fraction" 86 %fraction = OpVariable %_ptr_Function_v4float Function 98 %46 = OpAccessChain %_ptr_Function_float %fraction %int_0 106 %54 = OpLoad %v4float %fraction 117 %64 = OpLoad %v4float %fraction 119 OpStore %fraction %65 126 %71 = OpLoad %v4float %fraction 137 %81 = OpLoad %v4float %fraction 139 OpStore %fraction %82 146 %88 = OpLoad %v4float %fraction [all …]
|
/external/skia/resources/sksl/intrinsics/ |
D | Modf.sksl | 5 float4 whole, fraction; 9 fraction.x = modf(value.x, whole.x); 10 ok.x = whole.x == 2 && fraction.x == 0.5; 11 fraction.xy = modf(value.xy, whole.xy); 12 ok.y = whole.y == 2 && fraction.y == 0.5; 13 fraction.xyz = modf(value.xyz, whole.xyz); 14 ok.z = whole.z == 2 && fraction.z == 0.5; 15 fraction.xyzw = modf(value.xyzw, whole.xyzw); 16 ok.w = whole.w == 2 && fraction.w == 0.5;
|
/external/llvm-project/flang/include/flang/Evaluate/ |
D | rounding-bits.h | 25 constexpr RoundingBits(const FRACTION &fraction, int rshift) { in RoundingBits() argument 26 if (rshift > 0 && rshift < fraction.bits + 1) { in RoundingBits() 27 guard_ = fraction.BTEST(rshift - 1); in RoundingBits() 29 if (rshift > 1 && rshift < fraction.bits + 2) { in RoundingBits() 30 round_ = fraction.BTEST(rshift - 2); in RoundingBits() 33 if (rshift >= fraction.bits + 2) { in RoundingBits() 34 sticky_ = !fraction.IsZero(); in RoundingBits() 36 auto mask{fraction.MASKR(rshift - 2)}; in RoundingBits() 37 sticky_ = !fraction.IAND(mask).IsZero(); in RoundingBits()
|
/external/llvm-project/flang/lib/Decimal/ |
D | decimal-to-binary.cpp | 236 IntType fraction{value_}; in ToBinary() local 239 while (expo < 1 && (fraction > 0 || guard > oneHalf)) { in ToBinary() 241 ((static_cast<GuardType>(fraction) & 1) << (guardBits - 1)); in ToBinary() 242 fraction >>= 1; in ToBinary() 249 if (fraction == 0 && guard <= oneHalf) { in ToBinary() 253 while (fraction < topBit && expo > 1) { in ToBinary() 255 fraction = fraction * 2 + (guard >> (guardBits - 2)); in ToBinary() 262 incr = guard > oneHalf || (guard == oneHalf && (fraction & 1)); in ToBinary() 277 if (fraction == mask) { in ToBinary() 280 fraction = topBit; in ToBinary() [all …]
|
/external/tensorflow/tensorflow/lite/kernels/internal/ |
D | quantization_util.cc | 161 int64_t fraction = 0x40000000 + ((u & kFractionMask) >> kFractionShift); in IntegerFrExp() local 168 fraction += 1; in IntegerFrExp() 172 fraction *= -1; in IntegerFrExp() 175 return fraction; in IntegerFrExp() 178 double DoubleFromFractionAndShift(int64_t fraction, int shift) { in DoubleFromFractionAndShift() argument 186 if (fraction == 0) { in DoubleFromFractionAndShift() 188 } else if (fraction > 0) { in DoubleFromFractionAndShift() 196 if (fraction == 0) { in DoubleFromFractionAndShift() 201 bool is_negative = (fraction < 0); in DoubleFromFractionAndShift() 202 int64_t encoded_fraction = is_negative ? -fraction : fraction; in DoubleFromFractionAndShift() [all …]
|
/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/angle/third_party/vulkan-deps/glslang/src/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/angle/third_party/vulkan-deps/spirv-tools/src/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/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/lottie/lottie/src/main/java/com/airbnb/lottie/utils/ |
D | GammaEvaluator.java | 27 public static int evaluate(float fraction, int startInt, int endInt) { in evaluate() argument 51 float a = startA + fraction * (endA - startA); in evaluate() 52 float r = startR + fraction * (endR - startR); in evaluate() 53 float g = startG + fraction * (endG - startG); in evaluate() 54 float b = startB + fraction * (endB - startB); in evaluate()
|
/external/skia/gm/ |
D | stringart.cpp | 74 SkScalar fraction = 1.0f - TimeUtils::Scaled(1e-9 * nanos, 2.0f/kDesiredDurationSecs, 2.0f); in onAnimate() local 75 if (fraction <= 0.0f) { in onAnimate() 76 fraction = -fraction; in onAnimate() 79 SkASSERT(fraction >= 0.0f && fraction <= 1.0f); in onAnimate() 81 fNumSteps = (int) (fraction * kMaxNumSteps); in onAnimate()
|
/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/protobuf/src/google/protobuf/stubs/ |
D | mathutil.h | 111 const T fraction, const T margin); 116 const T fraction, const T margin) { in WithinFractionOrMargin() argument 118 GOOGLE_DCHECK((T(0) < fraction || T(0) == fraction) && in WithinFractionOrMargin() 119 fraction < T(1) && in WithinFractionOrMargin() 132 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/webrtc/rtc_base/numerics/ |
D | histogram_percentile_counter.cc | 52 float fraction) { in GetPercentile() argument 53 RTC_CHECK_LE(fraction, 1.0); in GetPercentile() 54 RTC_CHECK_GE(fraction, 0.0); in GetPercentile() 58 std::max(0.0f, std::ceil(total_elements_ * fraction) - 1)); in GetPercentile()
|
/external/chromium-trace/catapult/third_party/polymer/components/web-animations-js/src/ |
D | keyframe-interpolations.js | 21 return function(target, fraction) { argument 22 if (fraction != null) { 24 return fraction >= interpolation.applyFrom && fraction < interpolation.applyTo; 26 var offsetFraction = fraction - interpolation.startOffset;
|