/aosp_15_r20/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 …]
|
D | test_statistics.py | 10 import decimal 21 from decimal import Decimal 38 >>> _nan_equal(Decimal('NAN'), Decimal('NAN')) 40 >>> _nan_equal(Decimal('sNAN'), Decimal('sNAN')) 42 >>> _nan_equal(Decimal('NAN'), Decimal('sNAN')) 44 >>> _nan_equal(Decimal(42), Decimal('NAN')) 52 >>> _nan_equal(float('NAN'), Decimal('NAN')) 320 args1 = [2456, 37.8, -12.45, Decimal('2.54'), Fraction(17, 54)] 321 args2 = [2459, 37.2, -12.41, Decimal('2.59'), Fraction(15, 54)] 343 for type_ in (int, float, Decimal, Fraction): [all …]
|
/aosp_15_r20/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 …]
|
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r522817/python3/lib/python3.11/ |
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 …]
|
/aosp_15_r20/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 …]
|
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r536225/python3/lib/python3.11/ |
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 …]
|
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r530567b/python3/lib/python3.11/ |
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 …]
|
/aosp_15_r20/prebuilts/build-tools/common/py3-stdlib/ |
H A 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 …]
|
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r530567/python3/lib/python3.11/ |
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 …]
|
/aosp_15_r20/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 …]
|
/aosp_15_r20/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 …]
|
/aosp_15_r20/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 …]
|
/aosp_15_r20/external/sdk-platform-java/java-common-protos/proto-google-common-protos/src/main/java/com/google/type/ |
H A 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 …]
|
/aosp_15_r20/external/cldr/common/supplemental/ |
H A 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 …]
|
/aosp_15_r20/external/cronet/third_party/icu/source/data/misc/ |
H A 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 …]
|
/aosp_15_r20/external/icu/icu4c/source/data/misc/ |
H A 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 …]
|
/aosp_15_r20/external/icu/icu4c/source/data/locales/ |
H A 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 …]
|
/aosp_15_r20/external/cronet/third_party/icu/source/data/locales/ |
H A 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 …]
|
/aosp_15_r20/hardware/libhardware/modules/sensors/dynamic_sensor/HidUtils/test/ |
H A D | TestHidDescriptor.cpp | 258 HID_UNIT_EXPONENT(0x0E), // scale unit to provide 2 digits past the decimal point 292 HID_UNIT_EXPONENT(0x0E), // scale unit to provide 2 digits past the decimal point 299 HID_UNIT_EXPONENT(0x0E), // scale unit to provide 2 digits past the decimal point 306 HID_UNIT_EXPONENT(0x0E), // scale unit to provide 2 digits past the decimal point 313 HID_UNIT_EXPONENT(0x0E), // scale unit to provide 2 digits past the decimal point 320 HID_UNIT_EXPONENT(0x0E), // scale unit to provide 2 digits past the decimal point 327 HID_UNIT_EXPONENT(0x0E), // scale unit to provide 2 digits past the decimal point 411 HID_UNIT_EXPONENT(0x0E), // scale unit to provide 2 digits past the decimal point 418 HID_UNIT_EXPONENT(0x0E), // scale unit to provide 2 digits past the decimal point 425 HID_UNIT_EXPONENT(0x0E), // scale unit to provide 2 digits past the decimal point [all …]
|
/aosp_15_r20/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 …]
|
/aosp_15_r20/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 FP-to-decimal-string conversion is provided by the C library, and most C libraries try [all …]
|
/aosp_15_r20/external/python/cpython3/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 FP-to-decimal-string conversion is provided by the C library, and most C libraries try [all …]
|
/aosp_15_r20/prebuilts/go/linux-x86/src/math/big/ |
D | decimal.go | 5 // This file implements multi-precision decimal numbers. 6 // The implementation is for float to decimal conversion only; 9 // decimal and rounding. 12 // strconv/decimal.go: conversion of binary fractional values can be done 13 // precisely in multi-precision decimal because 2 divides 10 (required for 14 // >> of mantissa); but conversion of decimal floating-point values cannot 17 // In contrast to strconv/decimal.go, only right shift is implemented in 18 // decimal format - left shift can be done precisely in binary format. 22 // A decimal represents an unsigned floating-point number in decimal representation. 23 // The value of a non-zero decimal d is d.mant * 10**d.exp with 0.1 <= d.mant < 1, [all …]
|
/aosp_15_r20/external/apache-xml/src/main/java/org/apache/xalan/templates/ |
H A 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 …]
|
/aosp_15_r20/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 …]
|