|
| 1 | +# SOME DESCRIPTIVE TITLE. |
| 2 | +# Copyright (C) 2001-2021, Python Software Foundation |
| 3 | +# This file is distributed under the same license as the Python package. |
| 4 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 | +# |
| 6 | +#, fuzzy |
| 7 | +msgid "" |
| 8 | +msgstr "" |
| 9 | +"Project-Id-Version: Python 3.10\n" |
| 10 | +"Report-Msgid-Bugs-To: \n" |
| 11 | +"POT-Creation-Date: 2021-03-18 17:40+0100\n" |
| 12 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 13 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 14 | +" Language-Team: LANGUAGE <[email protected]>\n" |
| 15 | +"MIME-Version: 1.0\n" |
| 16 | +"Content-Type: text/plain; charset=UTF-8\n" |
| 17 | +"Content-Transfer-Encoding: 8bit\n" |
| 18 | + |
| 19 | +#: c-api/decimal.rst:7 |
| 20 | +msgid "Decimal capsule API" |
| 21 | +msgstr "" |
| 22 | + |
| 23 | +#: c-api/decimal.rst:9 |
| 24 | +msgid "" |
| 25 | +"Capsule API functions can be used in the same manner as regular library " |
| 26 | +"functions, provided that the API has been initialized." |
| 27 | +msgstr "" |
| 28 | + |
| 29 | +#: c-api/decimal.rst:14 |
| 30 | +msgid "Initialize" |
| 31 | +msgstr "" |
| 32 | + |
| 33 | +#: c-api/decimal.rst:16 |
| 34 | +msgid "" |
| 35 | +"Typically, a C extension module that uses the decimal API will do these " |
| 36 | +"steps in its init function:" |
| 37 | +msgstr "" |
| 38 | + |
| 39 | +#: c-api/decimal.rst:34 |
| 40 | +msgid "Type checking, predicates, accessors" |
| 41 | +msgstr "" |
| 42 | + |
| 43 | +#: c-api/decimal.rst:38 |
| 44 | +msgid "" |
| 45 | +"Return 1 if ``dec`` is a Decimal, 0 otherwise. This function does not set " |
| 46 | +"any exceptions." |
| 47 | +msgstr "" |
| 48 | + |
| 49 | +#: c-api/decimal.rst:44 |
| 50 | +msgid "Return 1 if ``dec`` is ``NaN``, ``sNaN`` or ``Infinity``, 0 otherwise." |
| 51 | +msgstr "" |
| 52 | + |
| 53 | +#: c-api/decimal.rst:55 c-api/decimal.rst:64 |
| 54 | +msgid "" |
| 55 | +"Set TypeError and return -1 if ``dec`` is not a Decimal. It is guaranteed " |
| 56 | +"that this is the only failure mode, so if ``dec`` has already been type-" |
| 57 | +"checked, no errors can occur and the function can be treated as a simple " |
| 58 | +"predicate." |
| 59 | +msgstr "" |
| 60 | + |
| 61 | +#: c-api/decimal.rst:53 |
| 62 | +msgid "Return 1 if ``dec`` is ``NaN`` or ``sNaN``, 0 otherwise." |
| 63 | +msgstr "" |
| 64 | + |
| 65 | +#: c-api/decimal.rst:62 |
| 66 | +msgid "Return 1 if ``dec`` is ``Infinity``, 0 otherwise." |
| 67 | +msgstr "" |
| 68 | + |
| 69 | +#: c-api/decimal.rst:71 |
| 70 | +msgid "" |
| 71 | +"Return the number of digits in the coefficient. For ``Infinity``, the " |
| 72 | +"number of digits is always zero. Typically, the same applies to ``NaN`` and " |
| 73 | +"``sNaN``, but both of these can have a payload that is equivalent to a " |
| 74 | +"coefficient. Therefore, ``NaNs`` can have a nonzero return value." |
| 75 | +msgstr "" |
| 76 | + |
| 77 | +#: c-api/decimal.rst:76 |
| 78 | +msgid "" |
| 79 | +"Set TypeError and return -1 if ``dec`` is not a Decimal. It is guaranteed " |
| 80 | +"that this is the only failure mode, so if ``dec`` has already been type-" |
| 81 | +"checked, no errors can occur and the function can be treated as a simple " |
| 82 | +"accessor." |
| 83 | +msgstr "" |
| 84 | + |
| 85 | +#: c-api/decimal.rst:82 |
| 86 | +msgid "Exact conversions between decimals and primitive C types" |
| 87 | +msgstr "" |
| 88 | + |
| 89 | +#: c-api/decimal.rst:84 |
| 90 | +msgid "" |
| 91 | +"This API supports conversions for decimals with a coefficient up to 38 " |
| 92 | +"digits." |
| 93 | +msgstr "" |
| 94 | + |
| 95 | +#: c-api/decimal.rst:87 |
| 96 | +msgid "Data structures" |
| 97 | +msgstr "" |
| 98 | + |
| 99 | +#: c-api/decimal.rst:89 |
| 100 | +msgid "" |
| 101 | +"The conversion functions use the following status codes and data structures:" |
| 102 | +msgstr "" |
| 103 | + |
| 104 | +#: c-api/decimal.rst:110 |
| 105 | +msgid "" |
| 106 | +"The status cases are explained below. ``sign`` is 0 for positive and 1 for " |
| 107 | +"negative. ``((uint128_t)hi << 64) + lo`` is the coefficient, ``exp`` is the " |
| 108 | +"exponent." |
| 109 | +msgstr "" |
| 110 | + |
| 111 | +#: c-api/decimal.rst:113 |
| 112 | +msgid "" |
| 113 | +"The data structure is called \"triple\" because the decimal triple (sign, " |
| 114 | +"coeff, exp) is an established term and (``hi``, ``lo``) represents a single " |
| 115 | +"``uint128_t`` coefficient." |
| 116 | +msgstr "" |
| 117 | + |
| 118 | +#: c-api/decimal.rst:216 |
| 119 | +msgid "Functions" |
| 120 | +msgstr "" |
| 121 | + |
| 122 | +#: c-api/decimal.rst:122 |
| 123 | +msgid "" |
| 124 | +"Convert a decimal to a triple. As above, it is guaranteed that the only " |
| 125 | +"Python failure mode is a TypeError, checks can be omitted if the type is " |
| 126 | +"known." |
| 127 | +msgstr "" |
| 128 | + |
| 129 | +#: c-api/decimal.rst:126 |
| 130 | +msgid "" |
| 131 | +"For simplicity, the usage of the function and all special cases are " |
| 132 | +"explained in code form and comments:" |
| 133 | +msgstr "" |
| 134 | + |
| 135 | +#: c-api/decimal.rst:180 |
| 136 | +msgid "" |
| 137 | +"Create a decimal from a triple. The following rules must be observed for " |
| 138 | +"initializing the triple:" |
| 139 | +msgstr "" |
| 140 | + |
| 141 | +#: c-api/decimal.rst:183 |
| 142 | +msgid "``triple.sign`` must always be 0 (for positive) or 1 (for negative)." |
| 143 | +msgstr "" |
| 144 | + |
| 145 | +#: c-api/decimal.rst:185 |
| 146 | +msgid "" |
| 147 | +"``MPD_TRIPLE_QNAN``: ``triple.exp`` must be 0. If ``triple.hi`` or ``triple." |
| 148 | +"lo`` are nonzero, create a ``NaN`` with a payload." |
| 149 | +msgstr "" |
| 150 | + |
| 151 | +#: c-api/decimal.rst:188 |
| 152 | +msgid "" |
| 153 | +"``MPD_TRIPLE_SNAN``: ``triple.exp`` must be 0. If ``triple.hi`` or ``triple." |
| 154 | +"lo`` are nonzero, create an ``sNaN`` with a payload." |
| 155 | +msgstr "" |
| 156 | + |
| 157 | +#: c-api/decimal.rst:191 |
| 158 | +msgid "" |
| 159 | +"``MPD_TRIPLE_INF``: ``triple.exp``, ``triple.hi`` and ``triple.lo`` must be " |
| 160 | +"zero." |
| 161 | +msgstr "" |
| 162 | + |
| 163 | +#: c-api/decimal.rst:193 |
| 164 | +msgid "" |
| 165 | +"``MPD_TRIPLE_NORMAL``: ``MPD_MIN_ETINY + 38 < triple.exp < MPD_MAX_EMAX - " |
| 166 | +"38``. ``triple.hi`` and ``triple.lo`` can be chosen freely." |
| 167 | +msgstr "" |
| 168 | + |
| 169 | +#: c-api/decimal.rst:196 |
| 170 | +msgid "``MPD_TRIPLE_ERROR``: It is always an error to set this tag." |
| 171 | +msgstr "" |
| 172 | + |
| 173 | +#: c-api/decimal.rst:199 |
| 174 | +msgid "" |
| 175 | +"If one of the above conditions is not met, the function returns ``NaN`` if " |
| 176 | +"the ``InvalidOperation`` trap is not set in the thread local context. " |
| 177 | +"Otherwise, it sets the ``InvalidOperation`` exception and returns NULL." |
| 178 | +msgstr "" |
| 179 | + |
| 180 | +#: c-api/decimal.rst:203 |
| 181 | +msgid "" |
| 182 | +"Additionally, though extremely unlikely give the small allocation sizes, the " |
| 183 | +"function can set ``MemoryError`` and return ``NULL``." |
| 184 | +msgstr "" |
| 185 | + |
| 186 | +#: c-api/decimal.rst:208 |
| 187 | +msgid "Advanced API" |
| 188 | +msgstr "" |
| 189 | + |
| 190 | +#: c-api/decimal.rst:210 |
| 191 | +msgid "" |
| 192 | +"This API enables the use of ``libmpdec`` functions. Since Python is " |
| 193 | +"compiled with hidden symbols, the API requires an external libmpdec and the " |
| 194 | +"``mpdecimal.h`` header." |
| 195 | +msgstr "" |
| 196 | + |
| 197 | +#: c-api/decimal.rst:220 |
| 198 | +msgid "" |
| 199 | +"Return a new decimal that can be used in the ``result`` position of " |
| 200 | +"``libmpdec`` functions." |
| 201 | +msgstr "" |
| 202 | + |
| 203 | +#: c-api/decimal.rst:225 |
| 204 | +msgid "" |
| 205 | +"Get a pointer to the internal ``mpd_t`` of the decimal. Decimals are " |
| 206 | +"immutable, so this function must only be used on a new Decimal that has been " |
| 207 | +"created by PyDec_Alloc()." |
| 208 | +msgstr "" |
| 209 | + |
| 210 | +#: c-api/decimal.rst:231 |
| 211 | +msgid "Get a pointer to the constant internal ``mpd_t`` of the decimal." |
| 212 | +msgstr "" |
0 commit comments