/external/cldr/tools/java/org/unicode/cldr/util/ |
D | Rational.java | 34 public final class Rational implements Comparable<Rational> { class 46 public static final Rational ZERO = Rational.of(0); 47 public static final Rational ONE = Rational.of(1); 48 public static final Rational NEGATIVE_ONE = ONE.negate(); 50 public static final Rational INFINITY = Rational.of(1,0); 51 public static final Rational NEGATIVE_INFINITY = INFINITY.negate(); 52 public static final Rational NaN = Rational.of(0,0); 54 public static final Rational TEN = Rational.of(10, 1); 55 public static final Rational TENTH = TEN.reciprocal(); 66 private Map<String,Rational> constants = new LinkedHashMap<>(); [all …]
|
D | UnitConverter.java | 25 import org.unicode.cldr.util.Rational.FormatStyle; 26 import org.unicode.cldr.util.Rational.RationalParser; 145 Output<Rational> deprefix = new Output<>(); in freeze() 149 … if (!deprefix.value.equals(Rational.ONE) || !entry.getValue().equals(INTEGER_ONE)) { in freeze() 158 if (!deprefix.value.equals(Rational.ONE)) { in freeze() 181 public final Rational factor; 182 public final Rational offset; 184 static final ConversionInfo IDENTITY = new ConversionInfo(Rational.ONE, Rational.ZERO); 186 public ConversionInfo(Rational factor, Rational offset) { in ConversionInfo() 191 public Rational convert(Rational source) { in convert() [all …]
|
D | UnitPreferences.java | 30 public final Rational geq; 34 public UnitPreference(Rational geq, String unit, String skeleton) { in UnitPreference() 78 Rational newGeq = geq == null || geq.isEmpty() ? Rational.ONE : Rational.of(geq); in add() 135 …h(int order, String quantity, String usage, Collection<String> regions, Rational geq, String skele… in getPath() 144 + (geq == Rational.ONE ? "" : "[@geq=\"" + geq + "\"]") in getPath() 170 Rational geq = converter.parseRational(String.valueOf(up.geq)); in getFastMap() 171 Rational value = converter.convert(geq, unit, baseUnit, false); in getFastMap() 172 if (value.equals(Rational.NaN)) { in getFastMap()
|
/external/cldr/tools/cldr-unittest/src/org/unicode/cldr/unittest/ |
D | TestUnits.java | 57 import org.unicode.cldr.util.Rational; 58 import org.unicode.cldr.util.Rational.ContinuedFraction; 59 import org.unicode.cldr.util.Rational.FormatStyle; 60 import org.unicode.cldr.util.Rational.RationalParser; 118 static final Rational R1000 = Rational.of(1000); 380 final Rational convert = converter.convertDirect(Rational.ONE, sourceUnit, targetUnit); in TestConversion() 381 assertEquals(sourceUnit + " to " + targetUnit, Rational.of(numerator, 1), convert); in TestConversion() 505 Rational expectedRational = new Rational.RationalParser().parse(test[2]); in TestParseUnit() 597 Rational a3_5 = Rational.of(3,5); in TestRational() 599 Rational a6_10 = Rational.of(6,10); in TestRational() [all …]
|
D | ExternalUnitConversionData.java | 10 import org.unicode.cldr.util.Rational; 29 …public ExternalUnitConversionData(String quantity, String source, String target, Rational factor, … in ExternalUnitConversionData() 42 Rational offset = temperatureHack.get(this.source + "|" + this.target); in ExternalUnitConversionData() 43 this.info = new ConversionInfo(factor, offset == null ? Rational.ZERO : offset); in ExternalUnitConversionData() 56 static final Map<String,Rational> temperatureHack = ImmutableMap.of( 57 "fahrenheit|celsius", Rational.of("-32/1.8"), 58 "fahrenheit|kelvin", Rational.of("459.67/1.8"), 59 "celsius|kelvin", Rational.of("273.15")
|
D | NistUnits.java | 18 import org.unicode.cldr.util.Rational; 69 … Rational factor = Rational.of((parts.get(2) + parts.get(3)).replace(" ", "")); in try() 131 …rgetInfo.put(name, new TargetInfo(targetUnit, new ConversionInfo(Rational.ONE, Rational.ZERO), Col… in try() 133 …nData data = new ExternalUnitConversionData(quantity, name, targetUnit, Rational.ONE, line, _idCha… in try()
|
/external/piex/src/ |
D | piex_types.h | 61 struct Rational { struct 70 Rational latitude[3]; 72 Rational longitude[3]; 74 Rational altitude; 76 Rational time_stamp[3]; // Giving hour, minute and second. 97 Rational exposure_time; 98 Rational fnumber; 99 Rational focal_length;
|
D | tiff_parser.cc | 29 using tiff_directory::Rational; 58 const int data_size, PreviewImageData::Rational* data) { in GetRational() 59 std::vector<Rational> value; in GetRational() 623 std::vector<Rational> crop_rational(2); in GetFullCropDimension()
|
/external/python/cpython2/Lib/ |
D | fractions.py | 15 Rational = numbers.Rational variable 44 class Fraction(Rational): 102 if isinstance(numerator, Rational): 151 elif (isinstance(numerator, Rational) and 152 isinstance(denominator, Rational)): 373 if isinstance(a, Rational): 421 if isinstance(div, Rational): 433 if isinstance(div, Rational): 459 if isinstance(b, Rational): 481 if isinstance(a, Rational): [all …]
|
D | numbers.py | 270 class Rational(Real): class 295 class Integral(Rational):
|
/external/python/cpython3/Lib/ |
D | fractions.py | 38 class Fraction(numbers.Rational): 101 elif isinstance(numerator, numbers.Rational): 145 elif (isinstance(numerator, numbers.Rational) and 146 isinstance(denominator, numbers.Rational)): 369 if isinstance(a, numbers.Rational): 441 if isinstance(b, numbers.Rational): 469 if isinstance(a, numbers.Rational): 567 if isinstance(b, numbers.Rational): 595 if isinstance(other, numbers.Rational):
|
D | numbers.py | 267 class Rational(Real): class 294 class Integral(Rational):
|
/external/cldr/tools/java/org/unicode/cldr/tool/ |
D | ChartGrammaticalForms.java | 34 import org.unicode.cldr.util.Rational; 35 import org.unicode.cldr.util.Rational.FormatStyle; 106 static final Map<String, Map<Rational, String>> BASE_TO_FACTOR_TO_UNIT; 108 Map<String, Map<Rational, String>> _BASE_TO_BEST = new TreeMap<>(); 125 Map<Rational, String> factorToUnit = _BASE_TO_BEST.get(baseOut.value); 128 factorToUnit.put(Rational.ONE, baseOut.value); in factorToUnit.put() 141 for (Entry<String, Map<Rational, String>> entry : BASE_TO_FACTOR_TO_UNIT.entrySet()) { 496 Map<Rational, String> factorToUnit = BASE_TO_FACTOR_TO_UNIT.get(baseUnit.value); in getBestBaseUnit() 501 Rational bestFactor = null; in getBestBaseUnit() 502 Rational inputBoundary = Rational.of(2).multiply(info.factor); in getBestBaseUnit() [all …]
|
D | ChartUnitConversions.java | 7 import org.unicode.cldr.util.Rational; 8 import org.unicode.cldr.util.Rational.FormatStyle; 87 ….addCell(targetInfo.unitInfo.offset.equals(Rational.ZERO) ? "" : targetInfo.unitInfo.offset.toStri… in writeContents()
|
D | ChartUnitPreferences.java | 12 import org.unicode.cldr.util.Rational.FormatStyle;
|
/external/piex/src/tiff_directory/ |
D | tiff_directory.h | 36 struct Rational { struct 99 bool Get(const Tag tag, Rational* value) const; 100 bool Get(const Tag tag, std::vector<Rational>* value) const;
|
D | tiff_directory.cc | 104 bool TiffDirectory::Get(const Tag tag, Rational* value) const { in Get() 105 std::vector<Rational> my_values; in Get() 113 bool TiffDirectory::Get(const Tag tag, std::vector<Rational>* value) const { in Get() 124 std::vector<Rational> my_value(directory_entry->count); in Get()
|
/external/python/cpython3/Doc/library/ |
D | numbers.rst | 59 .. class:: Rational 62 :attr:`~Rational.numerator` and :attr:`~Rational.denominator` properties, which 77 Subtypes :class:`Rational` and adds a conversion to :class:`int`. Provides 78 defaults for :func:`float`, :attr:`~Rational.numerator`, and 79 :attr:`~Rational.denominator`. Adds abstract methods for ``**`` and 201 if isinstance(a, Rational):
|
D | fractions.rst | 1 :mod:`fractions` --- Rational numbers 5 :synopsis: Rational numbers. 27 of :class:`numbers.Rational` and returns a new :class:`Fraction` instance 30 *other_fraction* is an instance of :class:`numbers.Rational` and returns a 78 :class:`numbers.Rational`, and implements all of the methods and
|
/external/python/cpython2/Doc/library/ |
D | numbers.rst | 58 .. class:: Rational 61 :attr:`~Rational.numerator` and :attr:`~Rational.denominator` properties, which 76 Subtypes :class:`Rational` and adds a conversion to :class:`int`. Provides 77 defaults for :func:`float`, :attr:`~Rational.numerator`, and 78 :attr:`~Rational.denominator`. Adds abstract methods for ``**`` and 198 if isinstance(a, Rational):
|
D | fractions.rst | 1 :mod:`fractions` --- Rational numbers 5 :synopsis: Rational numbers. 27 of :class:`numbers.Rational` and returns a new :class:`Fraction` instance 30 *other_fraction* is an instance of :class:`numbers.Rational` and returns a 78 :class:`numbers.Rational`, and implements all of the methods and
|
/external/python/cpython3/Lib/test/ |
D | test_abstract_numbers.py | 6 from numbers import Complex, Real, Rational, Integral 21 self.assertFalse(issubclass(float, Rational))
|
D | test_fractions.py | 26 if isinstance(other, numbers.Rational): 349 numbers.Rational.register(CustomValue)
|
/external/python/cpython2/Lib/test/ |
D | test_abstract_numbers.py | 5 from numbers import Complex, Real, Rational, Integral 30 self.assertFalse(issubclass(float, Rational))
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/ |
D | coverage.txt | 21 **Eventually will want to look at the Rational section in XSH6 because
|