Home
last modified time | relevance | path

Searched full:decimal (Results 1 – 25 of 3328) sorted by relevance

12345678910>>...134

/third_party/python/Lib/test/
Dtest_decimal.py11 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
63 C = import_fresh_module('decimal', fresh=['_decimal'])
64 P = import_fresh_module('decimal', blocked=['_decimal'])
65 import decimal as orig_sys_decimal
67 # fractions module must import the correct decimal module.
69 sys.modules['decimal'] = P
71 sys.modules['decimal'] = C
73 sys.modules['decimal'] = orig_sys_decimal
[all …]
Dtest_statistics.py10 import decimal
20 from decimal import Decimal
37 >>> _nan_equal(Decimal('NAN'), Decimal('NAN'))
39 >>> _nan_equal(Decimal('sNAN'), Decimal('sNAN'))
41 >>> _nan_equal(Decimal('NAN'), Decimal('sNAN'))
43 >>> _nan_equal(Decimal(42), Decimal('NAN'))
51 >>> _nan_equal(float('NAN'), Decimal('NAN'))
319 args1 = [2456, 37.8, -12.45, Decimal('2.54'), Fraction(17, 54)]
320 args2 = [2459, 37.2, -12.41, Decimal('2.59'), Fraction(15, 54)]
342 for type_ in (int, float, Decimal, Fraction):
[all …]
/third_party/python/Lib/
D_pydecimal.py17 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 …]
/third_party/python/Doc/library/
Ddecimal.rst1 :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 …]
Dfractions.rst23 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.
123 value of *dec*, which must be a :class:`decimal.Decimal` instance.
128 :class:`Fraction` instance directly from a :class:`decimal.Decimal`
/third_party/python/Lib/test/test_asyncio/
Dtest_context.py2 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)
/third_party/flutter/skia/third_party/externals/icu/source/data/misc/
Dplurals.txt314 " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1."
319 one{"i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04"}
321 " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2."
328 " 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1~1.6, 10.1, 100.1, 100"
332 " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0"
340 "11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1"
344 " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0"
353 "00, 10000, 100000, 1000000, … @decimal 0.0~0.3, 0.5, 0.7, 0.8, 1.0~1"
358 " @integer 4, 6, 9, 14, 16, 19, 24, 26, 104, 1004, … @decimal 0.4, 0."
366 "101, 1001, … @decimal 0.1, 1.0, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 1"
[all …]
/third_party/icu/icu4c/source/data/misc/
Dplurals.txt327 " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1."
332 one{"i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04"}
334 " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2."
341 " 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1~1.6, 10.1, 100.1, 100"
345 " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0"
353 "11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1"
357 " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0"
366 "00, 10000, 100000, 1000000, … @decimal 0.0~0.3, 0.5, 0.7, 0.8, 1.0~1"
371 " @integer 4, 6, 9, 14, 16, 19, 24, 26, 104, 1004, … @decimal 0.4, 0."
379 "101, 1001, … @decimal 0.1, 1.0, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 1"
[all …]
/third_party/skia/third_party/externals/icu/source/data/misc/
Dplurals.txt327 " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1."
332 one{"i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04"}
334 " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2."
341 " 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1~1.6, 10.1, 100.1, 100"
345 " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0"
353 "11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1"
357 " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0"
366 "00, 10000, 100000, 1000000, … @decimal 0.0~0.3, 0.5, 0.7, 0.8, 1.0~1"
371 " @integer 4, 6, 9, 14, 16, 19, 24, 26, 104, 1004, … @decimal 0.4, 0."
379 "101, 1001, … @decimal 0.1, 1.0, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 1"
[all …]
/third_party/flutter/flutter/packages/flutter/test/services/
Dtext_input_test.dart31 'decimal': null,
40 inputType: TextInputType.numberWithOptions(decimal: true),
49 'decimal': true,
62 const TextInputType decimal = TextInputType.numberWithOptions(decimal: true);
64 TextInputType.numberWithOptions(signed: true, decimal: true);
66 … expect(text.toString(), 'TextInputType(name: TextInputType.text, signed: null, decimal: null)');
67 …expect(number.toString(), 'TextInputType(name: TextInputType.number, signed: false, decimal: false…
68 …expect(signed.toString(), 'TextInputType(name: TextInputType.number, signed: true, decimal: false)…
69 …expect(decimal.toString(), 'TextInputType(name: TextInputType.number, signed: false, decimal: true…
70 …ignedDecimal.toString(), 'TextInputType(name: TextInputType.number, signed: true, decimal: true)');
[all …]
/third_party/tzdata/
Dnewstrftime.3.txt38 to an integer) as a decimal number [00,99].
45 %d is replaced by the day of the month as a decimal number [01,31].
47 %e is replaced by the day of month as a decimal number [1,31];
52 %G is replaced by the ISO 8601 year with century as a decimal
55 %g is replaced by the ISO 8601 year without century as a decimal
60 %H is replaced by the hour (24-hour clock) as a decimal number
63 %I is replaced by the hour (12-hour clock) as a decimal number
66 %j is replaced by the day of the year as a decimal number
69 %k is replaced by the hour (24-hour clock) as a decimal number
72 %l is replaced by the hour (12-hour clock) as a decimal number
[all …]
Dnewstrftime.3103 as a decimal number [00,99].
113 is replaced by the day of the month as a decimal number [01,31].
116 is replaced by the day of month as a decimal number [1,31];
125 is replaced by the ISO 8601 year with century as a decimal number.
131 is replaced by the ISO 8601 year without century as a decimal number [00,99].
139 is replaced by the hour (24-hour clock) as a decimal number [00,23].
142 is replaced by the hour (12-hour clock) as a decimal number [01,12].
145 is replaced by the day of the year as a decimal number [001,366].
148 is replaced by the hour (24-hour clock) as a decimal number [0,23];
152 is replaced by the hour (12-hour clock) as a decimal number [1,12];
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32/
Dexp_fp32.h42 MS_FLOAT32X4 decimal = MS_SUBQ_F32(input, MS_MULQ_F32(MS_CVTQEPI32_PS(integer), param[0])); in VexpFp32() local
44 MS_FLOAT32X4 tmp = MS_MULQ_F32(decimal, (MS_ADDQ_F32(param[2], MS_MULQ_F32(decimal, param[1])))); in VexpFp32()
45 …tmp = MS_MULQ_F32(decimal, MS_ADDQ_F32(param[4], MS_MULQ_F32(decimal, MS_ADDQ_F32(param[3], tmp)))… in VexpFp32()
46 …MS_FLOAT32X4 decimal_exp = MS_ADDQ_F32(param[5], MS_MULQ_F32(decimal, MS_ADDQ_F32(param[5], tmp))); in VexpFp32()
71 MS_FLOAT32X8 decimal = MS_SUB256_F32(input, MS_MUL256_F32(MS_CVT256EPI32_PS(integer), param[0])); in simd_exp_avx() local
73 …MS_FLOAT32X8 tmp = MS_MUL256_F32(decimal, (MS_ADD256_F32(param[2], MS_MUL256_F32(decimal, param[1]… in simd_exp_avx()
74 …tmp = MS_MUL256_F32(decimal, MS_ADD256_F32(param[4], MS_MUL256_F32(decimal, MS_ADD256_F32(param[3]… in simd_exp_avx()
75 …MS_FLOAT32X8 decimal_exp = MS_ADD256_F32(param[5], MS_MUL256_F32(decimal, MS_ADD256_F32(param[5], … in simd_exp_avx()
88 float decimal = src - integer * param[0]; in single_exp() local
92 …1.0f + decimal * (1.0f + decimal * (0.5f + decimal * (param[3] + decimal * (param[2] + decimal * p… in single_exp()
/third_party/boost/libs/test/doc/test_output/
Dlogging_floating_point.qbk10 …hat floating-point numbers are displayed by the __UTF__ with an excessive number of decimal digits.
13 the default precision for float of just 6 decimal digits, given by
14 `std::numeric_limits<float>::digits10`. The function used for the number of decimal
17 significant decimal digits value], to be called `std::numeric_limits::max_digits10();`.
18 For 32-bit floats, 9 decimal digits are needed to ensure a single bit change produces a different d…
21 So a much more helpful display using 9 decimal digits is thus:
25 For __IEEE754__ 32-bit float values - 9 decimal digits are shown. For 64-bit __IEEE754__ double - 1…
26 __IEEE754__ extended long double using 80-bit - 21 decimal digits. For __IEEE754__ quadruple long d…
27 extended long double 128-bit - 36 decimal digits. For floating-point types, a convenient formula to…
/third_party/python/Doc/tutorial/
Dfloatingpoint.rst15 fractions. For example, the decimal fraction ::
27 Unfortunately, most decimal fractions cannot be represented exactly as binary
28 fractions. A consequence is that, in general, the decimal floating-point
50 decimal value 0.1 cannot be represented exactly as a base 2 fraction. In base
63 displayed. Python only prints a decimal approximation to the true decimal
65 Python were to print the true decimal value of the binary approximation stored
80 Interestingly, there are many different decimal numbers that share the same
84 approximated by ``3602879701896397 / 2 ** 55``. Since all of these decimal
143 tasks, but you do need to keep in mind that it's not decimal arithmetic and
148 display of your final results to the number of decimal digits you expect.
[all …]
Dstdlib2.rst352 .. _tut-decimal-fp:
354 Decimal Floating Point Arithmetic
357 The :mod:`decimal` module offers a :class:`~decimal.Decimal` datatype for
358 decimal floating point arithmetic. Compared to the built-in :class:`float`
361 * financial applications and other uses which require exact decimal
365 * tracking of significant decimal places, or
370 results in decimal floating point and binary floating point. The difference
373 >>> from decimal import *
374 >>> round(Decimal('0.70') * Decimal('1.05'), 2)
375 Decimal('0.74')
[all …]
/third_party/python/Modules/_decimal/
Ddocstrings.h20 "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 …]
/third_party/libxml2/result/schemas/
Ddecimal-1_1_0.err1 ./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…
/third_party/python/Doc/whatsnew/
D2.4.rst471 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 …]
/third_party/gettext/gettext-tools/tests/
Dcldr-plurals-119decimal 0.0, 0.00, 0.000, 0.0000; one: n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000; two: n …
30 …1..14 @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …; other: @decimal 0.0~1.5, 10.0, 10…
43 …<pluralRule count="other"> @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5…
58 …teger 1; other: @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 10…
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp16/
Dexp_fp16.h42 float decimal = (float)src - integer * param[0]; in single_exp_fp16() local
45 …1.0f + decimal * (1.0f + decimal * (0.5f + decimal * (param[3] + decimal * (param[2] + decimal * p… in single_exp_fp16()
/third_party/skia/third_party/externals/icu/source/i18n/
Ddouble-conversion-double-to-string.h104 // converted into decimal format then a trailing decimal point is appended.
106 // - EMIT_TRAILING_ZERO_AFTER_POINT: in addition to a trailing decimal point
124 // represent input numbers in decimal format if they are in the interval
194 // (see constructor) it then either returns a decimal representation, or an
223 // (Sign, '0', decimal point, padding zeroes for decimal_in_shortest_low,
240 // Computes a decimal representation with a fixed number of digits after the
241 // decimal point. The last emitted digit is rounded.
273 // (one additional character for the sign, and one for the decimal point).
280 // after the decimal point. The last emitted digit is rounded.
306 // decimal point, the decimal point, the exponent character, the
[all …]
/third_party/icu/icu4c/source/i18n/
Ddouble-conversion-double-to-string.h104 // converted into decimal format then a trailing decimal point is appended.
106 // - EMIT_TRAILING_ZERO_AFTER_POINT: in addition to a trailing decimal point
124 // represent input numbers in decimal format if they are in the interval
194 // (see constructor) it then either returns a decimal representation, or an
223 // (Sign, '0', decimal point, padding zeroes for decimal_in_shortest_low,
240 // Computes a decimal representation with a fixed number of digits after the
241 // decimal point. The last emitted digit is rounded.
273 // (one additional character for the sign, and one for the decimal point).
280 // after the decimal point. The last emitted digit is rounded.
306 // decimal point, the decimal point, the exponent character, the
[all …]
/third_party/node/deps/icu-small/source/i18n/
Ddouble-conversion-double-to-string.h104 // converted into decimal format then a trailing decimal point is appended.
106 // - EMIT_TRAILING_ZERO_AFTER_POINT: in addition to a trailing decimal point
124 // represent input numbers in decimal format if they are in the interval
194 // (see constructor) it then either returns a decimal representation, or an
223 // (Sign, '0', decimal point, padding zeroes for decimal_in_shortest_low,
240 // Computes a decimal representation with a fixed number of digits after the
241 // decimal point. The last emitted digit is rounded.
273 // (one additional character for the sign, and one for the decimal point).
280 // after the decimal point. The last emitted digit is rounded.
306 // decimal point, the decimal point, the exponent character, the
[all …]
/third_party/icu/vendor/double-conversion/upstream/double-conversion/
Ddouble-to-string.h89 // converted into decimal format then a trailing decimal point is appended.
91 // - EMIT_TRAILING_ZERO_AFTER_POINT: in addition to a trailing decimal point
109 // represent input numbers in decimal format if they are in the interval
179 // (see constructor) it then either returns a decimal representation, or an
208 // (Sign, '0', decimal point, padding zeroes for decimal_in_shortest_low,
225 // Computes a decimal representation with a fixed number of digits after the
226 // decimal point. The last emitted digit is rounded.
258 // (one additional character for the sign, and one for the decimal point).
265 // after the decimal point. The last emitted digit is rounded.
291 // decimal point, the decimal point, the exponent character, the
[all …]

12345678910>>...134