/external/python/cpython2/Lib/test/ |
D | test_decimal.py | 11 These are the test cases for the Decimal module. 14 the Decimal arithmetic using the tests provided by Mike Cowlishaw. The latter 19 http://speleotrove.com/decimal/dectest.zip 32 from decimal import * 91 # Decimal behaves differently from decNumber for these testcases so these 149 # Name adapter to be able to change the Decimal and Context 190 # The following functions return True/False rather than a Decimal instance 207 """Class which tests the Decimal class against the test cases. 337 v = Decimal(v, self.context) 410 # The following classes test the behaviour of Decimal according to PEP 327 [all …]
|
D | test_fractions.py | 3 from decimal import Decimal 167 _components(F(Decimal('1.1')))) 169 _components(F(Decimal('3.5e-2')))) 171 _components(F(Decimal('.000e20')))) 172 self.assertRaises(TypeError, F, Decimal('nan')) 173 self.assertRaises(TypeError, F, Decimal('snan')) 174 self.assertRaises(TypeError, F, Decimal('inf')) 175 self.assertRaises(TypeError, F, Decimal('-inf')) 279 self.assertEqual(F(0), F.from_decimal(Decimal("-0"))) 280 self.assertEqual(F(5, 10), F.from_decimal(Decimal("0.5"))) [all …]
|
D | test_unicodedata.py | 94 str(self.db.decimal(char, -1)), 129 self.assertEqual(self.db.decimal(u'A',None), None) 130 self.assertEqual(self.db.decimal(u'9'), 9) 131 self.assertEqual(self.db.decimal(u'\u215b', None), None) 132 self.assertEqual(self.db.decimal(u'\u2468', None), None) 133 self.assertEqual(self.db.decimal(u'\U00020000', None), None) 135 self.assertRaises(TypeError, self.db.decimal) 136 self.assertRaises(TypeError, self.db.decimal, u'xx') 137 self.assertRaises(ValueError, self.db.decimal, u'x') 242 # Test that decimal and numeric are consistent, [all …]
|
/external/python/cpython2/Doc/library/ |
D | decimal.rst | 2 :mod:`decimal` --- Decimal fixed point and floating point arithmetic 5 .. module:: decimal 6 :synopsis: Implementation of the General Decimal Arithmetic Specification. 23 import decimal 25 from decimal import * 29 The :mod:`decimal` module provides support for decimal floating point 32 * Decimal "is based on a floating-point model which was designed with people 35 people learn at school." -- excerpt from the decimal arithmetic specification. 37 * Decimal numbers can be represented exactly. In contrast, numbers like 42 * The exactness carries over into arithmetic. In decimal floating point, ``0.1 [all …]
|
D | fractions.rst | 23 Fraction(decimal) 32 either a :class:`float` or a :class:`decimal.Decimal` instance, and return a 45 decimal digits. In addition, any string that represents a finite 72 >>> from decimal import Decimal 73 >>> Fraction(Decimal('1.1')) 85 :class:`decimal.Decimal` instances. 101 value of *dec*, which must be a :class:`decimal.Decimal`. 104 :class:`Fraction` instance directly from a :class:`decimal.Decimal`
|
D | tokenize.rst | 119 Example of a script re-writer that transforms float literals into Decimal 125 >>> from decimal import Decimal 128 "print +Decimal ('21.3e-5')*-Decimal ('.1234')/Decimal ('81.7')" 141 (NAME, 'Decimal'),
|
/external/python/cpython2/Lib/ |
D | decimal.py | 21 This is a Py2.3 implementation of decimal floating point arithmetic based on 22 the General Decimal Arithmetic Specification: 24 http://speleotrove.com/decimal/decarith.html 30 Decimal floating point has finite precision with arbitrarily large bounds. 38 of the expected Decimal('0.00') returned by decimal floating point). 40 Here are some examples of using the decimal module: 42 >>> from decimal import * 44 >>> Decimal(0) 45 Decimal('0') 46 >>> Decimal('1') [all …]
|
/external/icu/icu4c/source/data/misc/ |
D | plurals.txt | 300 " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1." 305 one{"i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04"} 307 " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2." 312 one{"n = 1 or t != 0 and i = 0,1 @integer 1 @decimal 0.1~1.6"} 314 " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0" 321 " 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1~1.6, 10.1, 100.1, 100" 325 " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0" 333 "1, 71, 101, 1001, … @decimal 0.1, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1," 346 "00, 10000, 100000, 1000000, … @decimal 0.0~0.3, 0.5, 0.7, 0.8, 1.0~1" 351 " @integer 4, 6, 9, 14, 16, 19, 24, 26, 104, 1004, … @decimal 0.4, 0." [all …]
|
/external/python/cpython2/Doc/tutorial/ |
D | floatingpoint.rst | 11 fractions. For example, the decimal fraction :: 23 Unfortunately, most decimal fractions cannot be represented exactly as binary 24 fractions. A consequence is that, in general, the decimal floating-point 46 decimal value 0.1 cannot be represented exactly as a base 2 fraction. In base 54 for a Python float, so the value stored internally when you enter the decimal 62 decimal fraction, because of the way that floats are displayed at the 63 interpreter prompt. Python only prints a decimal approximation to the true 64 decimal value of the binary approximation stored by the machine. If Python 65 were to print the true decimal value of the binary approximation stored for 92 value 2.675 to two decimal places, you get this :: [all …]
|
D | stdlib2.rst | 350 .. _tut-decimal-fp: 352 Decimal Floating Point Arithmetic 355 The :mod:`decimal` module offers a :class:`~decimal.Decimal` datatype for 356 decimal floating point arithmetic. Compared to the built-in :class:`float` 359 * financial applications and other uses which require exact decimal 363 * tracking of significant decimal places, or 368 results in decimal floating point and binary floating point. The difference 371 >>> from decimal import * 372 >>> x = Decimal('0.70') * Decimal('1.05') 374 Decimal('0.7350') [all …]
|
/external/apache-xml/src/main/java/org/apache/xalan/templates/ |
D | DecimalFormatProperties.java | 28 * Implement xsl:decimal-format. 30 * <!ELEMENT xsl:decimal-format EMPTY> 31 * <!ATTLIST xsl:decimal-format 33 * decimal-separator %char; "." 73 * Return the decimal format Symbols for this element. 74 * <p>The xsl:decimal-format element declares a decimal-format, 77 * the element declares a named decimal-format; otherwise, it 78 * declares the default decimal-format. The value of the name 80 * It is an error to declare either the default decimal-format or a 81 * decimal-format with a given name more than once (even with different [all …]
|
/external/messageformat/java/com/ibm/icu/simple/ |
D | LocaleElements_plurals.java | 1130 "000000, … @decimal 0.0~1.5, 10.0, 100.0, " + 1140 "i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1" + 1146 "000000, … @decimal 1.1~2.6, 10.0, 100.0, " + 1162 ", 1000000, … @decimal 0.0, 2.0~3.4, 10.0," + 1175 "1, 101, 1001, … @decimal 0.1~1.6, 10.1, 1" + 1181 ", 1000000, … @decimal 0.0, 2.0, 3.0, 4.0," + 1194 "… @decimal 0.1, 1.1, 2.1, 3.1, 4.1, 5.1, " + 1200 " 100000, 1000000, … @decimal 0.0, 0.2~1.0" + 1222 " 1004, … @decimal 0.4, 0.6, 0.9, 1.4, 1.6" + 1235 "1, 81, 101, 1001, … @decimal 0.1, 1.0, 1." + [all …]
|
/external/parameter-framework/upstream/test/test-fixed-point-parameter/ |
D | Main.py | 34 from decimal import Decimal 83 Decimal(0), 84 Decimal(self._lowerAllowedBound), 85 Decimal(self._upperAllowedBound) 93 Decimal(self._lowerAllowedBound) - Decimal(bigValue), 94 Decimal(self._upperAllowedBound) + Decimal(bigValue), 95 Decimal(self._lowerAllowedBound) - Decimal(littleValue), 96 Decimal(self._upperAllowedBound) + Decimal(littleValue) 159 returnValue = Decimal(firstGet) 161 print("ERROR: Can't convert %s to a decimal" % firstGet) [all …]
|
/external/python/cpython2/Doc/whatsnew/ |
D | 2.4.rst | 471 PEP 327: Decimal Data Type 477 unaware that floating-point numbers don't represent certain decimal fractions 478 accurately. The new :class:`Decimal` type can represent these fractions 482 Why is Decimal needed? 492 decimal notation. 494 * The exponent, which tells where the decimal point is located in the number 498 binary), and an exponent of 0 (the decimal point doesn't need to be shifted). 510 For example, 1.1 decimal is binary ``1.0001100110011 ...``; .1 = 1/16 + 1/32 + 512 that infinitely repeated decimal after 52 digits, so the representation is 521 decimal-string conversion is provided by the C library, and most C libraries try [all …]
|
/external/libxml2/result/schemas/ |
D | decimal-1_1_0.err | 1 ./test/schemas/decimal-1_0.xml:16: element val: Schemas validity error : Element 'val': '.' is not … 2 ./test/schemas/decimal-1_0.xml:17: element val: Schemas validity error : Element 'val': '-' is not … 3 ./test/schemas/decimal-1_0.xml:18: element val: Schemas validity error : Element 'val': '+' is not … 4 ./test/schemas/decimal-1_0.xml:19: element val: Schemas validity error : Element 'val': '*' is not … 5 ./test/schemas/decimal-1_0.xml:20: element val: Schemas validity error : Element 'val': '- 1' is no… 6 ./test/schemas/decimal-1_0.xml:21: element val: Schemas validity error : Element 'val': '+ 1' is no… 7 ./test/schemas/decimal-1_0.xml:22: element val: Schemas validity error : Element 'val': '+ 0' is no… 8 ./test/schemas/decimal-1_0.xml:23: element val: Schemas validity error : Element 'val': '- 0' is no…
|
D | decimal-3_1_0.err | 1 ./test/schemas/decimal-3_0.xml:12: element val: Schemas validity error : Element 'val': [facet 'tot… 2 ./test/schemas/decimal-3_0.xml:12: element val: Schemas validity error : Element 'val': '0.123' is … 3 ./test/schemas/decimal-3_0.xml:13: element val: Schemas validity error : Element 'val': [facet 'tot… 4 ./test/schemas/decimal-3_0.xml:13: element val: Schemas validity error : Element 'val': '0.023' is … 5 ./test/schemas/decimal-3_0.xml:14: element val: Schemas validity error : Element 'val': [facet 'tot… 6 ./test/schemas/decimal-3_0.xml:14: element val: Schemas validity error : Element 'val': '123' is no… 7 ./test/schemas/decimal-3_0.xml:15: element val: Schemas validity error : Element 'val': [facet 'tot… 8 ./test/schemas/decimal-3_0.xml:15: element val: Schemas validity error : Element 'val': '12.3' is n…
|
/external/icu/icu4c/source/i18n/ |
D | digitinterval.h | 27 * the digit position just to the left of the decimal is 0, and the digit 29 * the decimal is -1. The digit position just to the right of that is -2. 80 * Changes the number of digits to the left of the decimal point that 82 * to the left of the decimal point. 87 * Changes the number of digits to the right of the decimal point that 89 * to the right of the decimal point. 112 * decimal point. 119 * Returns number of digits to the left of the decimal that this 127 * Returns number of digits to the right of the decimal that this 137 * decimal point instead of some fixed number, then what length() [all …]
|
D | digitlst.h | 38 // Decimal digits in a 64-bit int 77 * Digit List is actually a Decimal Floating Point number. 79 * decimal number from the decNumber library. 84 * The change to decNumber enables support for big decimal numbers, and 85 * allows rounding computations to be done directly in decimal, avoiding 95 * positive/negative, grouping, decimal point, currency, and so on. 106 * decimal point, by 10^exponent. 115 * DigitList, decimal point is before the most significant. 116 * decNumber, decimal point is after the least signficant digit. 164 * you hit the decimal point, you set myDigitList.fDecimalAt = myDigitList.fCount; [all …]
|
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/issues/issue40/ |
D | DogFoodBean.java | 21 BigDecimal decimal; field in DogFoodBean 24 decimal = BigDecimal.ZERO; in DogFoodBean() 28 return decimal; in getDecimal() 31 public void setDecimal(BigDecimal decimal) { in setDecimal() argument 32 this.decimal = decimal; in setDecimal()
|
/external/icu/icu4c/source/data/locales/ |
D | gd.txt | 22 decimal{"٫"} 36 decimal{"٫"} 52 decimal{"."} 67 decimal{"."} 82 decimal{"."} 97 decimal{"."} 112 decimal{"."} 128 decimal{"."} 154 decimal{"."} 169 decimal{"."} [all …]
|
/external/python/cpython2/Python/ |
D | pystrtod.c | 118 have to first fix the decimal separator. 176 /* Check that what's left begins with a digit or decimal point */ in _PyOS_ascii_strtod() 185 swapped for the current locale's decimal point before we in _PyOS_ascii_strtod() 187 locale's decimal point then the input is invalid. */ in _PyOS_ascii_strtod() 210 /* For the other cases, we need not convert the decimal in _PyOS_ascii_strtod() 217 locale-specific decimal point */ in _PyOS_ascii_strtod() 372 /* Given a string that may have a decimal point in the current 477 /* Remove trailing zeros after the decimal point from a numeric string; also 478 remove the decimal point if all digits following it are zero. The numeric 480 whitespace. Assumes that the decimal point is '.'. */ [all …]
|
/external/python/cpython2/Lib/json/tests/ |
D | test_decode.py | 1 import decimal 9 rval = self.loads('1.1', parse_float=decimal.Decimal) 10 self.assertTrue(isinstance(rval, decimal.Decimal)) 11 self.assertEqual(rval, decimal.Decimal('1.1'))
|
/external/pdfium/third_party/freetype/src/psaux/ |
D | psconv.c | 38 /* digits (both decimal and non-decimal) into numbers. */ 200 FT_Long decimal = 0; in PS_Conv_ToFixed() local 235 /* read the decimal part */ in PS_Conv_ToFixed() 254 if ( divider < 0xCCCCCCCL && decimal < 0xCCCCCCCL ) in PS_Conv_ToFixed() 256 decimal = decimal * 10 + c; in PS_Conv_ToFixed() 291 if ( !integral && !decimal ) in PS_Conv_ToFixed() 305 if ( decimal >= 0xCCCCCCCL ) in PS_Conv_ToFixed() 312 decimal *= 10; in PS_Conv_ToFixed() 323 decimal /= 10; in PS_Conv_ToFixed() 325 if ( !integral && !decimal ) in PS_Conv_ToFixed() [all …]
|
/external/freetype/src/psaux/ |
D | psconv.c | 38 /* digits (both decimal and non-decimal) into numbers. */ 200 FT_Long decimal = 0; in PS_Conv_ToFixed() local 235 /* read the decimal part */ in PS_Conv_ToFixed() 254 if ( divider < 0xCCCCCCCL && decimal < 0xCCCCCCCL ) in PS_Conv_ToFixed() 256 decimal = decimal * 10 + c; in PS_Conv_ToFixed() 291 if ( !integral && !decimal ) in PS_Conv_ToFixed() 305 if ( decimal >= 0xCCCCCCCL ) in PS_Conv_ToFixed() 312 decimal *= 10; in PS_Conv_ToFixed() 323 decimal /= 10; in PS_Conv_ToFixed() 325 if ( !integral && !decimal ) in PS_Conv_ToFixed() [all …]
|
/external/icu/icu4c/source/i18n/unicode/ |
D | compactdecimalformat.h | 19 * \brief C++ API: Formats decimal numbers in compact form. 58 * Returns a compact decimal instance for specified locale. 263 * Format a decimal number. Currently sets status to U_UNSUPPORTED_ERROR 265 * as defined in the Decimal Arithmetic Specification, available at 266 * http://speleotrove.com/decimal 284 * Format a decimal number. Currently sets status to U_UNSUPPORTED_ERROR 285 * The number is a DigitList wrapper onto a floating point decimal number. 286 * The default implementation in NumberFormat converts the decimal number 289 * @param number The number, a DigitList format Decimal Floating Point. 304 * Format a decimal number. Currently sets status to U_UNSUPPORTED_ERROR. [all …]
|