/external/apache-commons-math/src/main/java/org/apache/commons/math/fraction/ |
D | Fraction.java | 37 public class Fraction class 39 implements FieldElement<Fraction>, Comparable<Fraction>, Serializable { 42 public static final Fraction TWO = new Fraction(2, 1); 45 public static final Fraction ONE = new Fraction(1, 1); 48 public static final Fraction ZERO = new Fraction(0, 1); 51 public static final Fraction FOUR_FIFTHS = new Fraction(4, 5); 54 public static final Fraction ONE_FIFTH = new Fraction(1, 5); 57 public static final Fraction ONE_HALF = new Fraction(1, 2); 60 public static final Fraction ONE_QUARTER = new Fraction(1, 4); 63 public static final Fraction ONE_THIRD = new Fraction(1, 3); [all …]
|
D | FractionFormat.java | 86 public static String formatFraction(Fraction f) { in formatFraction() 144 public StringBuffer format(final Fraction fraction, in format() 176 if (obj instanceof Fraction) { in format() 177 ret = format((Fraction) obj, toAppendTo, pos); in format() 180 ret = format(new Fraction(((Number) obj).doubleValue()), in format() 203 public Fraction parse(final String source) throws ParseException { in parse() 205 final Fraction result = parse(source, parsePosition); in parse() 222 public Fraction parse(final String source, final ParsePosition pos) { in parse() 245 return new Fraction(num.intValue(), 1); in parse() 271 return new Fraction(num.intValue(), den.intValue()); in parse()
|
D | FractionField.java | 33 public class FractionField implements Field<Fraction>, Serializable { 51 public Fraction getOne() { in getOne() 52 return Fraction.ONE; in getOne() 56 public Fraction getZero() { in getZero() 57 return Fraction.ZERO; in getZero()
|
D | ProperFractionFormat.java | 90 public StringBuffer format(Fraction fraction, StringBuffer toAppendTo, in format() 135 public Fraction parse(String source, ParsePosition pos) { in parse() 137 Fraction ret = super.parse(source, pos); in parse() 183 return new Fraction(num.intValue(), 1); in parse() 218 return new Fraction(((Math.abs(w) * d) + n) * MathUtils.sign(w), d); in parse()
|
/external/python/cpython2/Doc/library/ |
D | fractions.rst | 17 A Fraction instance can be constructed from a pair of integers, from 20 .. class:: Fraction(numerator=0, denominator=1) 21 Fraction(other_fraction) 22 Fraction(float) 23 Fraction(decimal) 24 Fraction(string) 27 of :class:`numbers.Rational` and returns a new :class:`Fraction` instance 31 :class:`Fraction` instance with the same value. The next two versions accept 33 :class:`Fraction` instance with exactly the same value. Note that due to the 35 argument to ``Fraction(1.1)`` is not exactly equal to 11/10, and so [all …]
|
D | numbers.rst | 87 extensions of the real numbers. For example, :class:`fractions.Fraction` 182 :class:`fractions.Fraction` uses:: 186 if isinstance(b, (int, long, Fraction)): 214 return Fraction(a.numerator * b.denominator +
|
/external/python/cpython3/Doc/library/ |
D | fractions.rst | 17 A Fraction instance can be constructed from a pair of integers, from 20 .. class:: Fraction(numerator=0, denominator=1) 21 Fraction(other_fraction) 22 Fraction(float) 23 Fraction(decimal) 24 Fraction(string) 27 of :class:`numbers.Rational` and returns a new :class:`Fraction` instance 31 :class:`Fraction` instance with the same value. The next two versions accept 33 :class:`Fraction` instance with exactly the same value. Note that due to the 35 argument to ``Fraction(1.1)`` is not exactly equal to 11/10, and so [all …]
|
D | statistics.rst | 27 :class:`float`, :class:`decimal.Decimal` and :class:`fractions.Fraction`. 90 >>> from fractions import Fraction as F 92 Fraction(13, 21) 354 >>> from fractions import Fraction as F 356 Fraction(13, 72) 420 Decimal and Fraction values are supported: 428 >>> from fractions import Fraction as F 430 Fraction(67, 108)
|
D | numbers.rst | 88 extensions of the real numbers. For example, :class:`fractions.Fraction` 185 :class:`fractions.Fraction` uses:: 189 if isinstance(b, (int, Fraction)): 217 return Fraction(a.numerator * b.denominator +
|
/external/python/cpython2/Lib/ |
D | fractions.py | 44 class Fraction(Rational): class 99 self = super(Fraction, cls).__new__(cls) 109 value = Fraction.from_float(numerator) 115 value = Fraction.from_decimal(numerator) 241 return Fraction(self) 254 bound1 = Fraction(p0+k*p1, q0+k*q1) 255 bound2 = Fraction(p1, q1) 361 if isinstance(b, (int, long, Fraction)): 389 return Fraction(a.numerator * b.denominator + 397 return Fraction(a.numerator * b.denominator - [all …]
|
/external/python/cpython3/Lib/ |
D | fractions.py | 60 class Fraction(numbers.Rational): class 115 self = super(Fraction, cls).__new__(cls) 254 return Fraction(self) 267 bound1 = Fraction(p0+k*p1, q0+k*q1) 268 bound2 = Fraction(p1, q1) 375 if isinstance(b, (int, Fraction)): 404 return Fraction(a.numerator * db + b.numerator * da, 412 return Fraction(a.numerator * db - b.numerator * da, 419 return Fraction(a.numerator * b.numerator, a.denominator * b.denominator) 425 return Fraction(a.numerator * b.denominator, [all …]
|
D | statistics.py | 89 from fractions import Fraction 158 total = sum(Fraction(n, d) for d, n in sorted(partials.items())) 191 if issubclass(T, Fraction) and issubclass(S, float): 193 if issubclass(T, float) and issubclass(S, Fraction):
|
/external/python/cpython3/Lib/test/ |
D | test_statistics.py | 16 from fractions import Fraction 295 args1 = [2456, 37.8, -12.45, Decimal('2.54'), Fraction(17, 54)] 296 args2 = [2459, 37.2, -12.41, Decimal('2.59'), Fraction(15, 54)] 318 for type_ in (int, float, Decimal, Fraction): 368 F = Fraction 386 f = Fraction(n, 1234) 396 for x in [8347, 101.3, -7910.28, Fraction(5, 21)]: 402 for x in [41017, 16.742, -813.02, Fraction(3, 8)]: 429 F = Fraction 467 delta = Fraction(1, 29) [all …]
|
D | test_random.py | 11 from fractions import Fraction 196 … [Fraction(1, 3), Fraction(2, 6), Fraction(3, 6), Fraction(4, 6)], # fractional weights 212 … [Fraction(1, 3), Fraction(2, 6), Fraction(3, 6), Fraction(4, 6)], # fractional cum_weights
|
D | test_math.py | 1005 from fractions import Fraction 1012 fx, fy, fr = Fraction(x), Fraction(y), Fraction(r) 1538 from fractions import Fraction 1541 (Fraction(1, 100000000) + 1, Fraction(1)), 1542 (Fraction(100000001), Fraction(100000000)), 1543 (Fraction(10**8 + 1, 10**28), Fraction(1, 10**20))]
|
D | test_itertools.py | 6 from fractions import Fraction 127 for typ in int, complex, Decimal, Fraction: # multiple types 534 self.assertEqual(take(3, count(Fraction(2, 3))), 535 [Fraction(2, 3), Fraction(5, 3), Fraction(8, 3)]) 584 self.assertEqual(take(3, count(Fraction(2,3), Fraction(1,7))), 585 [Fraction(2,3), Fraction(17,21), Fraction(20,21)])
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Utils/ |
D | ImportedFunctionsInliningStatistics.cpp | 71 static std::string getStatString(const char *Msg, int32_t Fraction, int32_t All, in getStatString() argument 76 Result = 100 * static_cast<double>(Fraction) / All; in getStatString() 79 Str << std::setprecision(4) << Msg << ": " << Fraction << " [" << Result in getStatString()
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/linear/ |
D | MatrixUtils.java | 32 import org.apache.commons.math.fraction.Fraction; 664 public static Array2DRowRealMatrix fractionMatrixToRealMatrix(final FieldMatrix<Fraction> m) { in fractionMatrixToRealMatrix() 671 …rivate static class FractionMatrixConverter extends DefaultFieldMatrixPreservingVisitor<Fraction> { 678 super(Fraction.ZERO); in FractionMatrixConverter() 690 public void visit(int row, int column, Fraction value) { in visit()
|
/external/webrtc/webrtc/video/ |
D | send_statistics_proxy.cc | 421 return Fraction(min_required_samples, 100.0f); in Percent() 426 return Fraction(min_required_samples, 1000.0f); in Permille() 429 int SendStatisticsProxy::BoolSampleCounter::Fraction( in Fraction() function in webrtc::SendStatisticsProxy::BoolSampleCounter
|
D | send_statistics_proxy.h | 119 int Fraction(int min_required_samples, float multiplier) const;
|
/external/fonttools/Tests/misc/ |
D | py23_test.py | 385 from fractions import Fraction 388 fraction_examples = [(Fraction(1, 100000000) + 1, Fraction(1))]
|
/external/python/cpython3/Doc/whatsnew/ |
D | 3.1.rst | 268 sequence including :class:`fractions.Fraction` and 277 >>> c = count(start=Fraction(1,2), step=Fraction(1,6)) 279 [Fraction(1, 2), Fraction(2, 3), Fraction(5, 6), Fraction(1, 1)]
|
/external/python/cpython2/Lib/test/ |
D | test_itertools.py | 6 from fractions import Fraction 360 self.assertEqual(take(3, count(Fraction(2, 3))), 361 [Fraction(2, 3), Fraction(5, 3), Fraction(8, 3)]) 409 self.assertEqual(take(3, count(Fraction(2,3), Fraction(1,7))), 410 [Fraction(2,3), Fraction(17,21), Fraction(20,21)])
|
D | test_fractions.py | 13 F = fractions.Fraction 65 if isinstance(other, fractions.Fraction): 92 class DummyFraction(fractions.Fraction):
|
/external/python/cpython3/Doc/tutorial/ |
D | floatingpoint.rst | 288 >>> from fractions import Fraction 290 >>> Fraction.from_float(0.1) 291 Fraction(3602879701896397, 36028797018963968)
|