| /external/python/cpython3/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 53 C = import_fresh_module('decimal', fresh=['_decimal']) 54 P = import_fresh_module('decimal', blocked=['_decimal']) 55 import decimal as orig_sys_decimal 57 # fractions module must import the correct decimal module. 59 sys.modules['decimal'] = P 61 sys.modules['decimal'] = C 63 sys.modules['decimal'] = orig_sys_decimal [all …]
|
| /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 …]
|
| /external/python/cpython3/Lib/ |
| D | _pydecimal.py | 17 This is an implementation of decimal floating point arithmetic based on 18 the General Decimal Arithmetic Specification: 20 http://speleotrove.com/decimal/decarith.html 26 Decimal floating point has finite precision with arbitrarily large bounds. 34 of 0.0; Decimal('1.00') % Decimal('0.1') returns the expected 35 Decimal('0.00')). 37 Here are some examples of using the decimal module: 39 >>> from decimal import * 41 >>> Decimal(0) 42 Decimal('0') [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 …]
|
| /external/python/cpython3/Doc/library/ |
| D | decimal.rst | 1 :mod:`decimal` --- Decimal fixed point and floating point arithmetic 4 .. module:: decimal 5 :synopsis: Implementation of the General Decimal Arithmetic Specification. 15 **Source code:** :source:`Lib/decimal.py` 20 import decimal 22 from decimal import * 33 The :mod:`decimal` module provides support for fast correctly rounded 34 decimal floating point arithmetic. It offers several advantages over the 37 * Decimal "is based on a floating-point model which was designed with people 40 people learn at school." -- excerpt from the decimal arithmetic specification. [all …]
|
| /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/sdk-platform-java/java-common-protos/proto-google-common-protos/src/main/java/com/google/type/ |
| D | Decimal.java | 17 // source: google/type/decimal.proto 25 * A representation of a decimal value, such as 2.5. Clients may convert values 26 * into language-native decimal formats, such as Java's [BigDecimal][] or 27 * Python's [decimal.Decimal][]. 30 * [decimal.Decimal]: https://docs.python.org/3/library/decimal.html 33 * Protobuf type {@code google.type.Decimal} 35 public final class Decimal extends com.google.protobuf.GeneratedMessageV3 class 37 // @@protoc_insertion_point(message_implements:google.type.Decimal) 40 // Use Decimal.newBuilder() to construct. 41 private Decimal(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { in Decimal() method in Decimal [all …]
|
| D | DecimalOrBuilder.java | 17 // source: google/type/decimal.proto 23 // @@protoc_insertion_point(interface_extends:google.type.Decimal) 30 * The decimal value, as a string. 32 * or `-` (`U+002D`), followed by a sequence of zero or more decimal digits 35 * The fraction consists of a decimal point followed by zero or more decimal 40 * followed by one or more decimal digits. 41 * Services **should** normalize decimal values before storing them by: 47 * and the internal decimal implementation selected, such as shifting the 48 * decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). 65 * the scale (number of digits after the decimal point), as well as how it [all …]
|
| /external/cldr/common/supplemental/ |
| D | plurals.xml | 17 …<pluralRule count="other"> @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 1… 23 … <pluralRule count="one">i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04</pluralRule> 24 …<pluralRule count="other"> @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2.6, 1… 27 <pluralRule count="one">i = 0,1 @integer 0, 1 @decimal 0.0~1.5</pluralRule> 28 …<pluralRule count="other"> @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 2.0~3.5, 1… 32 …e count="other"> @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 10… 35 …<pluralRule count="one">n = 0,1 or i = 0 and f = 1 @integer 0, 1 @decimal 0.0, 0.1, 1.0, 0.00, 0.0… 36 …<pluralRule count="other"> @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.2~0.9, 1… 39 …<pluralRule count="one">n = 0..1 @integer 0, 1 @decimal 0.0, 1.0, 0.00, 1.00, 0.000, 1.000, 0.0000… 40 …<pluralRule count="other"> @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1… [all …]
|
| /external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/ |
| D | BERTags.java | 12 public static final int ENUMERATED = 0x0a; // decimal 10 13 public static final int SEQUENCE = 0x10; // decimal 16 15 public static final int SET = 0x11; // decimal 17 19 public static final int NUMERIC_STRING = 0x12; // decimal 18 20 public static final int PRINTABLE_STRING = 0x13; // decimal 19 21 public static final int T61_STRING = 0x14; // decimal 20 22 public static final int VIDEOTEX_STRING = 0x15; // decimal 21 23 public static final int IA5_STRING = 0x16; // decimal 22 24 public static final int UTC_TIME = 0x17; // decimal 23 25 public static final int GENERALIZED_TIME = 0x18; // decimal 24 [all …]
|
| /external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/org/bouncycastle/asn1/ |
| D | BERTags.java | 16 public static final int ENUMERATED = 0x0a; // decimal 10 17 public static final int SEQUENCE = 0x10; // decimal 16 19 public static final int SET = 0x11; // decimal 17 23 public static final int NUMERIC_STRING = 0x12; // decimal 18 24 public static final int PRINTABLE_STRING = 0x13; // decimal 19 25 public static final int T61_STRING = 0x14; // decimal 20 26 public static final int VIDEOTEX_STRING = 0x15; // decimal 21 27 public static final int IA5_STRING = 0x16; // decimal 22 28 public static final int UTC_TIME = 0x17; // decimal 23 29 public static final int GENERALIZED_TIME = 0x18; // decimal 24 [all …]
|
| /external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/asn1/ |
| D | BERTags.java | 16 public static final int ENUMERATED = 0x0a; // decimal 10 17 public static final int SEQUENCE = 0x10; // decimal 16 19 public static final int SET = 0x11; // decimal 17 23 public static final int NUMERIC_STRING = 0x12; // decimal 18 24 public static final int PRINTABLE_STRING = 0x13; // decimal 19 25 public static final int T61_STRING = 0x14; // decimal 20 26 public static final int VIDEOTEX_STRING = 0x15; // decimal 21 27 public static final int IA5_STRING = 0x16; // decimal 22 28 public static final int UTC_TIME = 0x17; // decimal 23 29 public static final int GENERALIZED_TIME = 0x18; // decimal 24 [all …]
|
| /external/icu/icu4c/source/data/locales/ |
| D | oc_ES.txt | 20 decimal{"."} 52 decimal{"."} 67 decimal{"."} 82 decimal{"."} 97 decimal{"."} 112 decimal{"."} 127 decimal{"."} 142 decimal{"."} 157 decimal{"."} 172 decimal{"."} [all …]
|
| /external/icu/icu4c/source/data/misc/ |
| D | plurals.txt | 337 " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1." 342 one{"i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04"} 344 " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2." 351 "11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1" 355 " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0" 364 "00, 10000, 100000, 1000000, … @decimal 0.0~0.3, 0.5, 0.7, 0.8, 1.0~1" 369 " @integer 4, 6, 9, 14, 16, 19, 24, 26, 104, 1004, … @decimal 0.4, 0." 377 "101, 1001, … @decimal 0.1, 1.0, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 1" 381 " @integer 2~9, 22~29, 102, 1002, … @decimal 0.2~0.9, 1.2~1.9, 10.2, " 392 one{"i = 0,1 and n != 0 @integer 1 @decimal 0.1~1.6"} [all …]
|
| /external/cronet/third_party/icu/source/data/misc/ |
| D | plurals.txt | 335 " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1." 340 one{"i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04"} 342 " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2." 349 "11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1" 353 " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0" 362 "00, 10000, 100000, 1000000, … @decimal 0.0~0.3, 0.5, 0.7, 0.8, 1.0~1" 367 " @integer 4, 6, 9, 14, 16, 19, 24, 26, 104, 1004, … @decimal 0.4, 0." 375 "101, 1001, … @decimal 0.1, 1.0, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 1" 379 " @integer 2~9, 22~29, 102, 1002, … @decimal 0.2~0.9, 1.2~1.9, 10.2, " 390 one{"i = 0,1 and n != 0 @integer 1 @decimal 0.1~1.6"} [all …]
|
| /external/sdk-platform-java/java-common-protos/proto-google-common-protos/src/main/proto/google/type/ |
| D | decimal.proto | 20 option go_package = "google.golang.org/genproto/googleapis/type/decimal;decimal"; 26 // A representation of a decimal value, such as 2.5. Clients may convert values 27 // into language-native decimal formats, such as Java's [BigDecimal][] or 28 // Python's [decimal.Decimal][]. 32 // [decimal.Decimal]: https://docs.python.org/3/library/decimal.html 33 message Decimal { message 34 // The decimal value, as a string. 37 // or `-` (`U+002D`), followed by a sequence of zero or more decimal digits 41 // The fraction consists of a decimal point followed by zero or more decimal 47 // followed by one or more decimal digits. [all …]
|
| /external/googleapis/google/type/ |
| D | decimal.proto | 20 option go_package = "google.golang.org/genproto/googleapis/type/decimal;decimal"; 26 // A representation of a decimal value, such as 2.5. Clients may convert values 27 // into language-native decimal formats, such as Java's [BigDecimal][] or 28 // Python's [decimal.Decimal][]. 32 // [decimal.Decimal]: https://docs.python.org/3/library/decimal.html 33 message Decimal { message 34 // The decimal value, as a string. 37 // or `-` (`U+002D`), followed by a sequence of zero or more decimal digits 41 // The fraction consists of a decimal point followed by zero or more decimal 47 // followed by one or more decimal digits. [all …]
|
| /external/python/cpython3/Lib/test/test_asyncio/ |
| D | test_context.py | 2 import decimal 10 @unittest.skipUnless(decimal.HAVE_CONTEXTVAR, "decimal is built with a thread-local context") 15 with decimal.localcontext() as ctx: 17 a = decimal.Decimal(x) / decimal.Decimal(y) 19 b = decimal.Decimal(x) / decimal.Decimal(y ** 2)
|
| /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/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/cpython3/Modules/_decimal/ |
| D | docstrings.h | 20 "C decimal arithmetic module"); 52 /* Decimal Object and Methods */ 56 "Decimal(value=\"0\", context=None)\n--\n\n\ 57 Construct a new Decimal object. 'value' can be an integer, string, tuple,\n\ 58 or another Decimal object. If no value is given, return Decimal('0'). The\n\ 75 Decimal.as_integer_ratio() -> (int, int)\n\ 78 Decimal and with a positive denominator. The ratio is in lowest terms.\n\ 85 of a Decimal instance is always canonical, so this operation returns its\n\ 91 Compare self to other. Return a decimal value:\n\ 93 a or b is a NaN ==> Decimal('NaN')\n\ [all …]
|
| /external/python/cpython3/Doc/tutorial/ |
| D | floatingpoint.rst | 15 fractions. For example, the **decimal** fraction ``0.125`` 21 Unfortunately, most decimal fractions cannot be represented exactly as binary 22 fractions. A consequence is that, in general, the decimal floating-point 44 decimal value 0.1 cannot be represented exactly as a base 2 fraction. In base 57 displayed. Python only prints a decimal approximation to the true decimal 59 Python were to print the true decimal value of the binary approximation stored 74 Interestingly, there are many different decimal numbers that share the same 78 approximated by ``3602879701896397 / 2 ** 55``. Since all of these decimal 141 tasks, but you do need to keep in mind that it's not decimal arithmetic and 146 display of your final results to the number of decimal digits you expect. [all …]
|
| D | stdlib2.rst | 353 .. _tut-decimal-fp: 355 Decimal Floating Point Arithmetic 358 The :mod:`decimal` module offers a :class:`~decimal.Decimal` datatype for 359 decimal floating point arithmetic. Compared to the built-in :class:`float` 362 * financial applications and other uses which require exact decimal 366 * tracking of significant decimal places, or 371 results in decimal floating point and binary floating point. The difference 374 >>> from decimal import * 375 >>> round(Decimal('0.70') * Decimal('1.05'), 2) 376 Decimal('0.74') [all …]
|