Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2001-2012 Python Software Foundation. All Rights Reserved. |
| 3 | * Modified and extended by Stefan Krah. |
| 4 | */ |
| 5 | |
| 6 | |
| 7 | #ifndef DOCSTRINGS_H |
| 8 | #define DOCSTRINGS_H |
| 9 | |
| 10 | |
| 11 | #include "pymacro.h" |
| 12 | |
| 13 | |
| 14 | /******************************************************************************/ |
| 15 | /* Module */ |
| 16 | /******************************************************************************/ |
| 17 | |
| 18 | |
| 19 | PyDoc_STRVAR(doc__decimal, |
| 20 | "C decimal arithmetic module"); |
| 21 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 22 | PyDoc_STRVAR(doc_getcontext, |
| 23 | "getcontext($module, /)\n--\n\n\ |
| 24 | Get the current default context.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 25 | \n"); |
| 26 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 27 | PyDoc_STRVAR(doc_setcontext, |
| 28 | "setcontext($module, context, /)\n--\n\n\ |
| 29 | Set a new default context.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 30 | \n"); |
| 31 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 32 | PyDoc_STRVAR(doc_localcontext, |
| 33 | "localcontext($module, /, ctx=None)\n--\n\n\ |
| 34 | Return a context manager that will set the default context to a copy of ctx\n\ |
| 35 | on entry to the with-statement and restore the previous default context when\n\ |
| 36 | exiting the with-statement. If no context is specified, a copy of the current\n\ |
| 37 | default context is used.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 38 | \n"); |
| 39 | |
| 40 | #ifdef EXTRA_FUNCTIONALITY |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 41 | PyDoc_STRVAR(doc_ieee_context, |
| 42 | "IEEEContext($module, bits, /)\n--\n\n\ |
| 43 | Return a context object initialized to the proper values for one of the\n\ |
| 44 | IEEE interchange formats. The argument must be a multiple of 32 and less\n\ |
| 45 | than IEEE_CONTEXT_MAX_BITS. For the most common values, the constants\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 46 | DECIMAL32, DECIMAL64 and DECIMAL128 are provided.\n\ |
| 47 | \n"); |
| 48 | #endif |
| 49 | |
| 50 | |
| 51 | /******************************************************************************/ |
| 52 | /* Decimal Object and Methods */ |
| 53 | /******************************************************************************/ |
| 54 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 55 | PyDoc_STRVAR(doc_decimal, |
| 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\ |
| 59 | context does not affect the conversion and is only passed to determine if\n\ |
| 60 | the InvalidOperation trap is active.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 61 | \n"); |
| 62 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 63 | PyDoc_STRVAR(doc_adjusted, |
| 64 | "adjusted($self, /)\n--\n\n\ |
| 65 | Return the adjusted exponent of the number. Defined as exp + digits - 1.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 66 | \n"); |
| 67 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 68 | PyDoc_STRVAR(doc_as_tuple, |
| 69 | "as_tuple($self, /)\n--\n\n\ |
| 70 | Return a tuple representation of the number.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 71 | \n"); |
| 72 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 73 | PyDoc_STRVAR(doc_canonical, |
| 74 | "canonical($self, /)\n--\n\n\ |
| 75 | Return the canonical encoding of the argument. Currently, the encoding\n\ |
| 76 | of a Decimal instance is always canonical, so this operation returns its\n\ |
| 77 | argument unchanged.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 78 | \n"); |
| 79 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 80 | PyDoc_STRVAR(doc_compare, |
| 81 | "compare($self, /, other, context=None)\n--\n\n\ |
| 82 | Compare self to other. Return a decimal value:\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 83 | \n\ |
| 84 | a or b is a NaN ==> Decimal('NaN')\n\ |
| 85 | a < b ==> Decimal('-1')\n\ |
| 86 | a == b ==> Decimal('0')\n\ |
| 87 | a > b ==> Decimal('1')\n\ |
| 88 | \n"); |
| 89 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 90 | PyDoc_STRVAR(doc_compare_signal, |
| 91 | "compare_signal($self, /, other, context=None)\n--\n\n\ |
| 92 | Identical to compare, except that all NaNs signal.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 93 | \n"); |
| 94 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 95 | PyDoc_STRVAR(doc_compare_total, |
| 96 | "compare_total($self, /, other, context=None)\n--\n\n\ |
| 97 | Compare two operands using their abstract representation rather than\n\ |
| 98 | their numerical value. Similar to the compare() method, but the result\n\ |
| 99 | gives a total ordering on Decimal instances. Two Decimal instances with\n\ |
| 100 | the same numeric value but different representations compare unequal\n\ |
| 101 | in this ordering:\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 102 | \n\ |
| 103 | >>> Decimal('12.0').compare_total(Decimal('12'))\n\ |
| 104 | Decimal('-1')\n\ |
| 105 | \n\ |
| 106 | Quiet and signaling NaNs are also included in the total ordering. The result\n\ |
| 107 | of this function is Decimal('0') if both operands have the same representation,\n\ |
| 108 | Decimal('-1') if the first operand is lower in the total order than the second,\n\ |
| 109 | and Decimal('1') if the first operand is higher in the total order than the\n\ |
| 110 | second operand. See the specification for details of the total order.\n\ |
Stefan Krah | 040e311 | 2012-12-15 22:33:33 +0100 | [diff] [blame] | 111 | \n\ |
| 112 | This operation is unaffected by context and is quiet: no flags are changed\n\ |
| 113 | and no rounding is performed. As an exception, the C version may raise\n\ |
| 114 | InvalidOperation if the second operand cannot be converted exactly.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 115 | \n"); |
| 116 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 117 | PyDoc_STRVAR(doc_compare_total_mag, |
| 118 | "compare_total_mag($self, /, other, context=None)\n--\n\n\ |
| 119 | Compare two operands using their abstract representation rather than their\n\ |
| 120 | value as in compare_total(), but ignoring the sign of each operand.\n\ |
| 121 | \n\ |
| 122 | x.compare_total_mag(y) is equivalent to x.copy_abs().compare_total(y.copy_abs()).\n\ |
Stefan Krah | 040e311 | 2012-12-15 22:33:33 +0100 | [diff] [blame] | 123 | \n\ |
| 124 | This operation is unaffected by context and is quiet: no flags are changed\n\ |
| 125 | and no rounding is performed. As an exception, the C version may raise\n\ |
| 126 | InvalidOperation if the second operand cannot be converted exactly.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 127 | \n"); |
| 128 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 129 | PyDoc_STRVAR(doc_conjugate, |
| 130 | "conjugate($self, /)\n--\n\n\ |
| 131 | Return self.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 132 | \n"); |
| 133 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 134 | PyDoc_STRVAR(doc_copy_abs, |
| 135 | "copy_abs($self, /)\n--\n\n\ |
| 136 | Return the absolute value of the argument. This operation is unaffected by\n\ |
| 137 | context and is quiet: no flags are changed and no rounding is performed.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 138 | \n"); |
| 139 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 140 | PyDoc_STRVAR(doc_copy_negate, |
| 141 | "copy_negate($self, /)\n--\n\n\ |
| 142 | Return the negation of the argument. This operation is unaffected by context\n\ |
| 143 | and is quiet: no flags are changed and no rounding is performed.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 144 | \n"); |
| 145 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 146 | PyDoc_STRVAR(doc_copy_sign, |
| 147 | "copy_sign($self, /, other, context=None)\n--\n\n\ |
| 148 | Return a copy of the first operand with the sign set to be the same as the\n\ |
| 149 | sign of the second operand. For example:\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 150 | \n\ |
| 151 | >>> Decimal('2.3').copy_sign(Decimal('-1.5'))\n\ |
| 152 | Decimal('-2.3')\n\ |
| 153 | \n\ |
Stefan Krah | 040e311 | 2012-12-15 22:33:33 +0100 | [diff] [blame] | 154 | This operation is unaffected by context and is quiet: no flags are changed\n\ |
| 155 | and no rounding is performed. As an exception, the C version may raise\n\ |
| 156 | InvalidOperation if the second operand cannot be converted exactly.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 157 | \n"); |
| 158 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 159 | PyDoc_STRVAR(doc_exp, |
| 160 | "exp($self, /, context=None)\n--\n\n\ |
| 161 | Return the value of the (natural) exponential function e**x at the given\n\ |
| 162 | number. The function always uses the ROUND_HALF_EVEN mode and the result\n\ |
| 163 | is correctly rounded.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 164 | \n"); |
| 165 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 166 | PyDoc_STRVAR(doc_from_float, |
Stefan Krah | 6b7786b | 2014-05-02 14:34:11 +0200 | [diff] [blame] | 167 | "from_float($type, f, /)\n--\n\n\ |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 168 | Class method that converts a float to a decimal number, exactly.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 169 | Since 0.1 is not exactly representable in binary floating point,\n\ |
| 170 | Decimal.from_float(0.1) is not the same as Decimal('0.1').\n\ |
| 171 | \n\ |
| 172 | >>> Decimal.from_float(0.1)\n\ |
| 173 | Decimal('0.1000000000000000055511151231257827021181583404541015625')\n\ |
| 174 | >>> Decimal.from_float(float('nan'))\n\ |
| 175 | Decimal('NaN')\n\ |
| 176 | >>> Decimal.from_float(float('inf'))\n\ |
| 177 | Decimal('Infinity')\n\ |
| 178 | >>> Decimal.from_float(float('-inf'))\n\ |
| 179 | Decimal('-Infinity')\n\ |
| 180 | \n\ |
| 181 | \n"); |
| 182 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 183 | PyDoc_STRVAR(doc_fma, |
| 184 | "fma($self, /, other, third, context=None)\n--\n\n\ |
| 185 | Fused multiply-add. Return self*other+third with no rounding of the\n\ |
| 186 | intermediate product self*other.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 187 | \n\ |
| 188 | >>> Decimal(2).fma(3, 5)\n\ |
| 189 | Decimal('11')\n\ |
| 190 | \n\ |
| 191 | \n"); |
| 192 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 193 | PyDoc_STRVAR(doc_is_canonical, |
| 194 | "is_canonical($self, /)\n--\n\n\ |
| 195 | Return True if the argument is canonical and False otherwise. Currently,\n\ |
| 196 | a Decimal instance is always canonical, so this operation always returns\n\ |
| 197 | True.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 198 | \n"); |
| 199 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 200 | PyDoc_STRVAR(doc_is_finite, |
| 201 | "is_finite($self, /)\n--\n\n\ |
| 202 | Return True if the argument is a finite number, and False if the argument\n\ |
| 203 | is infinite or a NaN.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 204 | \n"); |
| 205 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 206 | PyDoc_STRVAR(doc_is_infinite, |
| 207 | "is_infinite($self, /)\n--\n\n\ |
| 208 | Return True if the argument is either positive or negative infinity and\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 209 | False otherwise.\n\ |
| 210 | \n"); |
| 211 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 212 | PyDoc_STRVAR(doc_is_nan, |
| 213 | "is_nan($self, /)\n--\n\n\ |
| 214 | Return True if the argument is a (quiet or signaling) NaN and False\n\ |
| 215 | otherwise.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 216 | \n"); |
| 217 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 218 | PyDoc_STRVAR(doc_is_normal, |
| 219 | "is_normal($self, /, context=None)\n--\n\n\ |
| 220 | Return True if the argument is a normal finite non-zero number with an\n\ |
| 221 | adjusted exponent greater than or equal to Emin. Return False if the\n\ |
| 222 | argument is zero, subnormal, infinite or a NaN.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 223 | \n"); |
| 224 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 225 | PyDoc_STRVAR(doc_is_qnan, |
| 226 | "is_qnan($self, /)\n--\n\n\ |
| 227 | Return True if the argument is a quiet NaN, and False otherwise.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 228 | \n"); |
| 229 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 230 | PyDoc_STRVAR(doc_is_signed, |
| 231 | "is_signed($self, /)\n--\n\n\ |
| 232 | Return True if the argument has a negative sign and False otherwise.\n\ |
| 233 | Note that both zeros and NaNs can carry signs.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 234 | \n"); |
| 235 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 236 | PyDoc_STRVAR(doc_is_snan, |
| 237 | "is_snan($self, /)\n--\n\n\ |
| 238 | Return True if the argument is a signaling NaN and False otherwise.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 239 | \n"); |
| 240 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 241 | PyDoc_STRVAR(doc_is_subnormal, |
| 242 | "is_subnormal($self, /, context=None)\n--\n\n\ |
| 243 | Return True if the argument is subnormal, and False otherwise. A number is\n\ |
| 244 | subnormal if it is non-zero, finite, and has an adjusted exponent less\n\ |
| 245 | than Emin.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 246 | \n"); |
| 247 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 248 | PyDoc_STRVAR(doc_is_zero, |
| 249 | "is_zero($self, /)\n--\n\n\ |
| 250 | Return True if the argument is a (positive or negative) zero and False\n\ |
| 251 | otherwise.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 252 | \n"); |
| 253 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 254 | PyDoc_STRVAR(doc_ln, |
| 255 | "ln($self, /, context=None)\n--\n\n\ |
| 256 | Return the natural (base e) logarithm of the operand. The function always\n\ |
| 257 | uses the ROUND_HALF_EVEN mode and the result is correctly rounded.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 258 | \n"); |
| 259 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 260 | PyDoc_STRVAR(doc_log10, |
| 261 | "log10($self, /, context=None)\n--\n\n\ |
| 262 | Return the base ten logarithm of the operand. The function always uses the\n\ |
| 263 | ROUND_HALF_EVEN mode and the result is correctly rounded.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 264 | \n"); |
| 265 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 266 | PyDoc_STRVAR(doc_logb, |
| 267 | "logb($self, /, context=None)\n--\n\n\ |
| 268 | For a non-zero number, return the adjusted exponent of the operand as a\n\ |
| 269 | Decimal instance. If the operand is a zero, then Decimal('-Infinity') is\n\ |
| 270 | returned and the DivisionByZero condition is raised. If the operand is\n\ |
| 271 | an infinity then Decimal('Infinity') is returned.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 272 | \n"); |
| 273 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 274 | PyDoc_STRVAR(doc_logical_and, |
| 275 | "logical_and($self, /, other, context=None)\n--\n\n\ |
| 276 | Return the digit-wise 'and' of the two (logical) operands.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 277 | \n"); |
| 278 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 279 | PyDoc_STRVAR(doc_logical_invert, |
| 280 | "logical_invert($self, /, context=None)\n--\n\n\ |
| 281 | Return the digit-wise inversion of the (logical) operand.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 282 | \n"); |
| 283 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 284 | PyDoc_STRVAR(doc_logical_or, |
| 285 | "logical_or($self, /, other, context=None)\n--\n\n\ |
| 286 | Return the digit-wise 'or' of the two (logical) operands.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 287 | \n"); |
| 288 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 289 | PyDoc_STRVAR(doc_logical_xor, |
| 290 | "logical_xor($self, /, other, context=None)\n--\n\n\ |
| 291 | Return the digit-wise 'exclusive or' of the two (logical) operands.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 292 | \n"); |
| 293 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 294 | PyDoc_STRVAR(doc_max, |
| 295 | "max($self, /, other, context=None)\n--\n\n\ |
| 296 | Maximum of self and other. If one operand is a quiet NaN and the other is\n\ |
| 297 | numeric, the numeric operand is returned.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 298 | \n"); |
| 299 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 300 | PyDoc_STRVAR(doc_max_mag, |
| 301 | "max_mag($self, /, other, context=None)\n--\n\n\ |
| 302 | Similar to the max() method, but the comparison is done using the absolute\n\ |
| 303 | values of the operands.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 304 | \n"); |
| 305 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 306 | PyDoc_STRVAR(doc_min, |
| 307 | "min($self, /, other, context=None)\n--\n\n\ |
| 308 | Minimum of self and other. If one operand is a quiet NaN and the other is\n\ |
| 309 | numeric, the numeric operand is returned.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 310 | \n"); |
| 311 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 312 | PyDoc_STRVAR(doc_min_mag, |
| 313 | "min_mag($self, /, other, context=None)\n--\n\n\ |
| 314 | Similar to the min() method, but the comparison is done using the absolute\n\ |
| 315 | values of the operands.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 316 | \n"); |
| 317 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 318 | PyDoc_STRVAR(doc_next_minus, |
| 319 | "next_minus($self, /, context=None)\n--\n\n\ |
| 320 | Return the largest number representable in the given context (or in the\n\ |
| 321 | current default context if no context is given) that is smaller than the\n\ |
| 322 | given operand.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 323 | \n"); |
| 324 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 325 | PyDoc_STRVAR(doc_next_plus, |
| 326 | "next_plus($self, /, context=None)\n--\n\n\ |
| 327 | Return the smallest number representable in the given context (or in the\n\ |
| 328 | current default context if no context is given) that is larger than the\n\ |
| 329 | given operand.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 330 | \n"); |
| 331 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 332 | PyDoc_STRVAR(doc_next_toward, |
| 333 | "next_toward($self, /, other, context=None)\n--\n\n\ |
| 334 | If the two operands are unequal, return the number closest to the first\n\ |
| 335 | operand in the direction of the second operand. If both operands are\n\ |
| 336 | numerically equal, return a copy of the first operand with the sign set\n\ |
| 337 | to be the same as the sign of the second operand.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 338 | \n"); |
| 339 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 340 | PyDoc_STRVAR(doc_normalize, |
| 341 | "normalize($self, /, context=None)\n--\n\n\ |
| 342 | Normalize the number by stripping the rightmost trailing zeros and\n\ |
| 343 | converting any result equal to Decimal('0') to Decimal('0e0'). Used\n\ |
| 344 | for producing canonical values for members of an equivalence class.\n\ |
| 345 | For example, Decimal('32.100') and Decimal('0.321000e+2') both normalize\n\ |
| 346 | to the equivalent value Decimal('32.1').\n\ |
| 347 | \n"); |
| 348 | |
| 349 | PyDoc_STRVAR(doc_number_class, |
| 350 | "number_class($self, /, context=None)\n--\n\n\ |
| 351 | Return a string describing the class of the operand. The returned value\n\ |
| 352 | is one of the following ten strings:\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 353 | \n\ |
| 354 | * '-Infinity', indicating that the operand is negative infinity.\n\ |
| 355 | * '-Normal', indicating that the operand is a negative normal number.\n\ |
| 356 | * '-Subnormal', indicating that the operand is negative and subnormal.\n\ |
| 357 | * '-Zero', indicating that the operand is a negative zero.\n\ |
| 358 | * '+Zero', indicating that the operand is a positive zero.\n\ |
| 359 | * '+Subnormal', indicating that the operand is positive and subnormal.\n\ |
| 360 | * '+Normal', indicating that the operand is a positive normal number.\n\ |
| 361 | * '+Infinity', indicating that the operand is positive infinity.\n\ |
| 362 | * 'NaN', indicating that the operand is a quiet NaN (Not a Number).\n\ |
| 363 | * 'sNaN', indicating that the operand is a signaling NaN.\n\ |
| 364 | \n\ |
| 365 | \n"); |
| 366 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 367 | PyDoc_STRVAR(doc_quantize, |
| 368 | "quantize($self, /, exp, rounding=None, context=None)\n--\n\n\ |
| 369 | Return a value equal to the first operand after rounding and having the\n\ |
| 370 | exponent of the second operand.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 371 | \n\ |
| 372 | >>> Decimal('1.41421356').quantize(Decimal('1.000'))\n\ |
| 373 | Decimal('1.414')\n\ |
| 374 | \n\ |
| 375 | Unlike other operations, if the length of the coefficient after the quantize\n\ |
| 376 | operation would be greater than precision, then an InvalidOperation is signaled.\n\ |
| 377 | This guarantees that, unless there is an error condition, the quantized exponent\n\ |
| 378 | is always equal to that of the right-hand operand.\n\ |
| 379 | \n\ |
| 380 | Also unlike other operations, quantize never signals Underflow, even if the\n\ |
| 381 | result is subnormal and inexact.\n\ |
| 382 | \n\ |
| 383 | If the exponent of the second operand is larger than that of the first, then\n\ |
| 384 | rounding may be necessary. In this case, the rounding mode is determined by the\n\ |
| 385 | rounding argument if given, else by the given context argument; if neither\n\ |
| 386 | argument is given, the rounding mode of the current thread's context is used.\n\ |
| 387 | \n"); |
| 388 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 389 | PyDoc_STRVAR(doc_radix, |
| 390 | "radix($self, /)\n--\n\n\ |
| 391 | Return Decimal(10), the radix (base) in which the Decimal class does\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 392 | all its arithmetic. Included for compatibility with the specification.\n\ |
| 393 | \n"); |
| 394 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 395 | PyDoc_STRVAR(doc_remainder_near, |
| 396 | "remainder_near($self, /, other, context=None)\n--\n\n\ |
| 397 | Return the remainder from dividing self by other. This differs from\n\ |
| 398 | self % other in that the sign of the remainder is chosen so as to minimize\n\ |
| 399 | its absolute value. More precisely, the return value is self - n * other\n\ |
| 400 | where n is the integer nearest to the exact value of self / other, and\n\ |
| 401 | if two integers are equally near then the even one is chosen.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 402 | \n\ |
Stefan Krah | 040e311 | 2012-12-15 22:33:33 +0100 | [diff] [blame] | 403 | If the result is zero then its sign will be the sign of self.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 404 | \n"); |
| 405 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 406 | PyDoc_STRVAR(doc_rotate, |
| 407 | "rotate($self, /, other, context=None)\n--\n\n\ |
| 408 | Return the result of rotating the digits of the first operand by an amount\n\ |
| 409 | specified by the second operand. The second operand must be an integer in\n\ |
| 410 | the range -precision through precision. The absolute value of the second\n\ |
| 411 | operand gives the number of places to rotate. If the second operand is\n\ |
| 412 | positive then rotation is to the left; otherwise rotation is to the right.\n\ |
| 413 | The coefficient of the first operand is padded on the left with zeros to\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 414 | length precision if necessary. The sign and exponent of the first operand are\n\ |
| 415 | unchanged.\n\ |
| 416 | \n"); |
| 417 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 418 | PyDoc_STRVAR(doc_same_quantum, |
| 419 | "same_quantum($self, /, other, context=None)\n--\n\n\ |
| 420 | Test whether self and other have the same exponent or whether both are NaN.\n\ |
Stefan Krah | 040e311 | 2012-12-15 22:33:33 +0100 | [diff] [blame] | 421 | \n\ |
| 422 | This operation is unaffected by context and is quiet: no flags are changed\n\ |
| 423 | and no rounding is performed. As an exception, the C version may raise\n\ |
| 424 | InvalidOperation if the second operand cannot be converted exactly.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 425 | \n"); |
| 426 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 427 | PyDoc_STRVAR(doc_scaleb, |
| 428 | "scaleb($self, /, other, context=None)\n--\n\n\ |
| 429 | Return the first operand with the exponent adjusted the second. Equivalently,\n\ |
| 430 | return the first operand multiplied by 10**other. The second operand must be\n\ |
| 431 | an integer.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 432 | \n"); |
| 433 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 434 | PyDoc_STRVAR(doc_shift, |
| 435 | "shift($self, /, other, context=None)\n--\n\n\ |
| 436 | Return the result of shifting the digits of the first operand by an amount\n\ |
| 437 | specified by the second operand. The second operand must be an integer in\n\ |
| 438 | the range -precision through precision. The absolute value of the second\n\ |
| 439 | operand gives the number of places to shift. If the second operand is\n\ |
| 440 | positive, then the shift is to the left; otherwise the shift is to the\n\ |
| 441 | right. Digits shifted into the coefficient are zeros. The sign and exponent\n\ |
| 442 | of the first operand are unchanged.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 443 | \n"); |
| 444 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 445 | PyDoc_STRVAR(doc_sqrt, |
| 446 | "sqrt($self, /, context=None)\n--\n\n\ |
| 447 | Return the square root of the argument to full precision. The result is\n\ |
| 448 | correctly rounded using the ROUND_HALF_EVEN rounding mode.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 449 | \n"); |
| 450 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 451 | PyDoc_STRVAR(doc_to_eng_string, |
| 452 | "to_eng_string($self, /, context=None)\n--\n\n\ |
| 453 | Convert to an engineering-type string. Engineering notation has an exponent\n\ |
| 454 | which is a multiple of 3, so there are up to 3 digits left of the decimal\n\ |
| 455 | place. For example, Decimal('123E+1') is converted to Decimal('1.23E+3').\n\ |
Stefan Krah | 040e311 | 2012-12-15 22:33:33 +0100 | [diff] [blame] | 456 | \n\ |
| 457 | The value of context.capitals determines whether the exponent sign is lower\n\ |
| 458 | or upper case. Otherwise, the context does not affect the operation.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 459 | \n"); |
| 460 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 461 | PyDoc_STRVAR(doc_to_integral, |
| 462 | "to_integral($self, /, rounding=None, context=None)\n--\n\n\ |
| 463 | Identical to the to_integral_value() method. The to_integral() name has been\n\ |
| 464 | kept for compatibility with older versions.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 465 | \n"); |
| 466 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 467 | PyDoc_STRVAR(doc_to_integral_exact, |
| 468 | "to_integral_exact($self, /, rounding=None, context=None)\n--\n\n\ |
| 469 | Round to the nearest integer, signaling Inexact or Rounded as appropriate if\n\ |
| 470 | rounding occurs. The rounding mode is determined by the rounding parameter\n\ |
| 471 | if given, else by the given context. If neither parameter is given, then the\n\ |
| 472 | rounding mode of the current default context is used.\n\ |
| 473 | \n"); |
| 474 | |
| 475 | PyDoc_STRVAR(doc_to_integral_value, |
| 476 | "to_integral_value($self, /, rounding=None, context=None)\n--\n\n\ |
| 477 | Round to the nearest integer without signaling Inexact or Rounded. The\n\ |
| 478 | rounding mode is determined by the rounding parameter if given, else by\n\ |
| 479 | the given context. If neither parameter is given, then the rounding mode\n\ |
Stefan Krah | 040e311 | 2012-12-15 22:33:33 +0100 | [diff] [blame] | 480 | of the current default context is used.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 481 | \n"); |
| 482 | |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 483 | |
| 484 | /******************************************************************************/ |
| 485 | /* Context Object and Methods */ |
| 486 | /******************************************************************************/ |
| 487 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 488 | PyDoc_STRVAR(doc_context, |
| 489 | "Context(prec=None, rounding=None, Emin=None, Emax=None, capitals=None, clamp=None, flags=None, traps=None)\n--\n\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 490 | The context affects almost all operations and controls rounding,\n\ |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 491 | Over/Underflow, raising of exceptions and much more. A new context\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 492 | can be constructed as follows:\n\ |
| 493 | \n\ |
| 494 | >>> c = Context(prec=28, Emin=-425000000, Emax=425000000,\n\ |
| 495 | ... rounding=ROUND_HALF_EVEN, capitals=1, clamp=1,\n\ |
| 496 | ... traps=[InvalidOperation, DivisionByZero, Overflow],\n\ |
| 497 | ... flags=[])\n\ |
| 498 | >>>\n\ |
| 499 | \n\ |
| 500 | \n"); |
| 501 | |
| 502 | #ifdef EXTRA_FUNCTIONALITY |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 503 | PyDoc_STRVAR(doc_ctx_apply, |
| 504 | "apply($self, x, /)\n--\n\n\ |
| 505 | Apply self to Decimal x.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 506 | \n"); |
| 507 | #endif |
| 508 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 509 | PyDoc_STRVAR(doc_ctx_clear_flags, |
| 510 | "clear_flags($self, /)\n--\n\n\ |
| 511 | Reset all flags to False.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 512 | \n"); |
| 513 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 514 | PyDoc_STRVAR(doc_ctx_clear_traps, |
| 515 | "clear_traps($self, /)\n--\n\n\ |
| 516 | Set all traps to False.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 517 | \n"); |
| 518 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 519 | PyDoc_STRVAR(doc_ctx_copy, |
| 520 | "copy($self, /)\n--\n\n\ |
| 521 | Return a duplicate of the context with all flags cleared.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 522 | \n"); |
| 523 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 524 | PyDoc_STRVAR(doc_ctx_copy_decimal, |
| 525 | "copy_decimal($self, x, /)\n--\n\n\ |
| 526 | Return a copy of Decimal x.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 527 | \n"); |
| 528 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 529 | PyDoc_STRVAR(doc_ctx_create_decimal, |
| 530 | "create_decimal($self, num=\"0\", /)\n--\n\n\ |
| 531 | Create a new Decimal instance from num, using self as the context. Unlike the\n\ |
| 532 | Decimal constructor, this function observes the context limits.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 533 | \n"); |
| 534 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 535 | PyDoc_STRVAR(doc_ctx_create_decimal_from_float, |
| 536 | "create_decimal_from_float($self, f, /)\n--\n\n\ |
| 537 | Create a new Decimal instance from float f. Unlike the Decimal.from_float()\n\ |
| 538 | class method, this function observes the context limits.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 539 | \n"); |
| 540 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 541 | PyDoc_STRVAR(doc_ctx_Etiny, |
| 542 | "Etiny($self, /)\n--\n\n\ |
| 543 | Return a value equal to Emin - prec + 1, which is the minimum exponent value\n\ |
| 544 | for subnormal results. When underflow occurs, the exponent is set to Etiny.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 545 | \n"); |
| 546 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 547 | PyDoc_STRVAR(doc_ctx_Etop, |
| 548 | "Etop($self, /)\n--\n\n\ |
| 549 | Return a value equal to Emax - prec + 1. This is the maximum exponent\n\ |
| 550 | if the _clamp field of the context is set to 1 (IEEE clamp mode). Etop()\n\ |
| 551 | must not be negative.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 552 | \n"); |
| 553 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 554 | PyDoc_STRVAR(doc_ctx_abs, |
| 555 | "abs($self, x, /)\n--\n\n\ |
| 556 | Return the absolute value of x.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 557 | \n"); |
| 558 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 559 | PyDoc_STRVAR(doc_ctx_add, |
| 560 | "add($self, x, y, /)\n--\n\n\ |
| 561 | Return the sum of x and y.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 562 | \n"); |
| 563 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 564 | PyDoc_STRVAR(doc_ctx_canonical, |
| 565 | "canonical($self, x, /)\n--\n\n\ |
| 566 | Return a new instance of x.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 567 | \n"); |
| 568 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 569 | PyDoc_STRVAR(doc_ctx_compare, |
| 570 | "compare($self, x, y, /)\n--\n\n\ |
| 571 | Compare x and y numerically.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 572 | \n"); |
| 573 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 574 | PyDoc_STRVAR(doc_ctx_compare_signal, |
| 575 | "compare_signal($self, x, y, /)\n--\n\n\ |
| 576 | Compare x and y numerically. All NaNs signal.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 577 | \n"); |
| 578 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 579 | PyDoc_STRVAR(doc_ctx_compare_total, |
| 580 | "compare_total($self, x, y, /)\n--\n\n\ |
| 581 | Compare x and y using their abstract representation.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 582 | \n"); |
| 583 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 584 | PyDoc_STRVAR(doc_ctx_compare_total_mag, |
| 585 | "compare_total_mag($self, x, y, /)\n--\n\n\ |
| 586 | Compare x and y using their abstract representation, ignoring sign.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 587 | \n"); |
| 588 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 589 | PyDoc_STRVAR(doc_ctx_copy_abs, |
| 590 | "copy_abs($self, x, /)\n--\n\n\ |
| 591 | Return a copy of x with the sign set to 0.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 592 | \n"); |
| 593 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 594 | PyDoc_STRVAR(doc_ctx_copy_negate, |
| 595 | "copy_negate($self, x, /)\n--\n\n\ |
| 596 | Return a copy of x with the sign inverted.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 597 | \n"); |
| 598 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 599 | PyDoc_STRVAR(doc_ctx_copy_sign, |
| 600 | "copy_sign($self, x, y, /)\n--\n\n\ |
| 601 | Copy the sign from y to x.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 602 | \n"); |
| 603 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 604 | PyDoc_STRVAR(doc_ctx_divide, |
| 605 | "divide($self, x, y, /)\n--\n\n\ |
| 606 | Return x divided by y.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 607 | \n"); |
| 608 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 609 | PyDoc_STRVAR(doc_ctx_divide_int, |
| 610 | "divide_int($self, x, y, /)\n--\n\n\ |
| 611 | Return x divided by y, truncated to an integer.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 612 | \n"); |
| 613 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 614 | PyDoc_STRVAR(doc_ctx_divmod, |
| 615 | "divmod($self, x, y, /)\n--\n\n\ |
| 616 | Return quotient and remainder of the division x / y.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 617 | \n"); |
| 618 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 619 | PyDoc_STRVAR(doc_ctx_exp, |
| 620 | "exp($self, x, /)\n--\n\n\ |
| 621 | Return e ** x.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 622 | \n"); |
| 623 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 624 | PyDoc_STRVAR(doc_ctx_fma, |
| 625 | "fma($self, x, y, z, /)\n--\n\n\ |
| 626 | Return x multiplied by y, plus z.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 627 | \n"); |
| 628 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 629 | PyDoc_STRVAR(doc_ctx_is_canonical, |
| 630 | "is_canonical($self, x, /)\n--\n\n\ |
| 631 | Return True if x is canonical, False otherwise.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 632 | \n"); |
| 633 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 634 | PyDoc_STRVAR(doc_ctx_is_finite, |
| 635 | "is_finite($self, x, /)\n--\n\n\ |
| 636 | Return True if x is finite, False otherwise.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 637 | \n"); |
| 638 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 639 | PyDoc_STRVAR(doc_ctx_is_infinite, |
| 640 | "is_infinite($self, x, /)\n--\n\n\ |
| 641 | Return True if x is infinite, False otherwise.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 642 | \n"); |
| 643 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 644 | PyDoc_STRVAR(doc_ctx_is_nan, |
| 645 | "is_nan($self, x, /)\n--\n\n\ |
| 646 | Return True if x is a qNaN or sNaN, False otherwise.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 647 | \n"); |
| 648 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 649 | PyDoc_STRVAR(doc_ctx_is_normal, |
| 650 | "is_normal($self, x, /)\n--\n\n\ |
| 651 | Return True if x is a normal number, False otherwise.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 652 | \n"); |
| 653 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 654 | PyDoc_STRVAR(doc_ctx_is_qnan, |
| 655 | "is_qnan($self, x, /)\n--\n\n\ |
| 656 | Return True if x is a quiet NaN, False otherwise.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 657 | \n"); |
| 658 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 659 | PyDoc_STRVAR(doc_ctx_is_signed, |
| 660 | "is_signed($self, x, /)\n--\n\n\ |
| 661 | Return True if x is negative, False otherwise.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 662 | \n"); |
| 663 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 664 | PyDoc_STRVAR(doc_ctx_is_snan, |
| 665 | "is_snan($self, x, /)\n--\n\n\ |
| 666 | Return True if x is a signaling NaN, False otherwise.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 667 | \n"); |
| 668 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 669 | PyDoc_STRVAR(doc_ctx_is_subnormal, |
| 670 | "is_subnormal($self, x, /)\n--\n\n\ |
| 671 | Return True if x is subnormal, False otherwise.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 672 | \n"); |
| 673 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 674 | PyDoc_STRVAR(doc_ctx_is_zero, |
| 675 | "is_zero($self, x, /)\n--\n\n\ |
| 676 | Return True if x is a zero, False otherwise.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 677 | \n"); |
| 678 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 679 | PyDoc_STRVAR(doc_ctx_ln, |
| 680 | "ln($self, x, /)\n--\n\n\ |
| 681 | Return the natural (base e) logarithm of x.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 682 | \n"); |
| 683 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 684 | PyDoc_STRVAR(doc_ctx_log10, |
| 685 | "log10($self, x, /)\n--\n\n\ |
| 686 | Return the base 10 logarithm of x.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 687 | \n"); |
| 688 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 689 | PyDoc_STRVAR(doc_ctx_logb, |
| 690 | "logb($self, x, /)\n--\n\n\ |
| 691 | Return the exponent of the magnitude of the operand's MSD.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 692 | \n"); |
| 693 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 694 | PyDoc_STRVAR(doc_ctx_logical_and, |
| 695 | "logical_and($self, x, y, /)\n--\n\n\ |
| 696 | Digit-wise and of x and y.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 697 | \n"); |
| 698 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 699 | PyDoc_STRVAR(doc_ctx_logical_invert, |
| 700 | "logical_invert($self, x, /)\n--\n\n\ |
| 701 | Invert all digits of x.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 702 | \n"); |
| 703 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 704 | PyDoc_STRVAR(doc_ctx_logical_or, |
| 705 | "logical_or($self, x, y, /)\n--\n\n\ |
| 706 | Digit-wise or of x and y.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 707 | \n"); |
| 708 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 709 | PyDoc_STRVAR(doc_ctx_logical_xor, |
| 710 | "logical_xor($self, x, y, /)\n--\n\n\ |
| 711 | Digit-wise xor of x and y.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 712 | \n"); |
| 713 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 714 | PyDoc_STRVAR(doc_ctx_max, |
| 715 | "max($self, x, y, /)\n--\n\n\ |
| 716 | Compare the values numerically and return the maximum.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 717 | \n"); |
| 718 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 719 | PyDoc_STRVAR(doc_ctx_max_mag, |
| 720 | "max_mag($self, x, y, /)\n--\n\n\ |
| 721 | Compare the values numerically with their sign ignored.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 722 | \n"); |
| 723 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 724 | PyDoc_STRVAR(doc_ctx_min, |
| 725 | "min($self, x, y, /)\n--\n\n\ |
| 726 | Compare the values numerically and return the minimum.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 727 | \n"); |
| 728 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 729 | PyDoc_STRVAR(doc_ctx_min_mag, |
| 730 | "min_mag($self, x, y, /)\n--\n\n\ |
| 731 | Compare the values numerically with their sign ignored.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 732 | \n"); |
| 733 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 734 | PyDoc_STRVAR(doc_ctx_minus, |
| 735 | "minus($self, x, /)\n--\n\n\ |
| 736 | Minus corresponds to the unary prefix minus operator in Python, but applies\n\ |
| 737 | the context to the result.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 738 | \n"); |
| 739 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 740 | PyDoc_STRVAR(doc_ctx_multiply, |
| 741 | "multiply($self, x, y, /)\n--\n\n\ |
| 742 | Return the product of x and y.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 743 | \n"); |
| 744 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 745 | PyDoc_STRVAR(doc_ctx_next_minus, |
| 746 | "next_minus($self, x, /)\n--\n\n\ |
| 747 | Return the largest representable number smaller than x.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 748 | \n"); |
| 749 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 750 | PyDoc_STRVAR(doc_ctx_next_plus, |
| 751 | "next_plus($self, x, /)\n--\n\n\ |
| 752 | Return the smallest representable number larger than x.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 753 | \n"); |
| 754 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 755 | PyDoc_STRVAR(doc_ctx_next_toward, |
| 756 | "next_toward($self, x, y, /)\n--\n\n\ |
| 757 | Return the number closest to x, in the direction towards y.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 758 | \n"); |
| 759 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 760 | PyDoc_STRVAR(doc_ctx_normalize, |
| 761 | "normalize($self, x, /)\n--\n\n\ |
| 762 | Reduce x to its simplest form. Alias for reduce(x).\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 763 | \n"); |
| 764 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 765 | PyDoc_STRVAR(doc_ctx_number_class, |
| 766 | "number_class($self, x, /)\n--\n\n\ |
| 767 | Return an indication of the class of x.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 768 | \n"); |
| 769 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 770 | PyDoc_STRVAR(doc_ctx_plus, |
| 771 | "plus($self, x, /)\n--\n\n\ |
| 772 | Plus corresponds to the unary prefix plus operator in Python, but applies\n\ |
| 773 | the context to the result.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 774 | \n"); |
| 775 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 776 | PyDoc_STRVAR(doc_ctx_power, |
| 777 | "power($self, /, a, b, modulo=None)\n--\n\n\ |
| 778 | Compute a**b. If 'a' is negative, then 'b' must be integral. The result\n\ |
| 779 | will be inexact unless 'a' is integral and the result is finite and can\n\ |
| 780 | be expressed exactly in 'precision' digits. In the Python version the\n\ |
| 781 | result is always correctly rounded, in the C version the result is almost\n\ |
| 782 | always correctly rounded.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 783 | \n\ |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 784 | If modulo is given, compute (a**b) % modulo. The following restrictions\n\ |
| 785 | hold:\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 786 | \n\ |
| 787 | * all three arguments must be integral\n\ |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 788 | * 'b' must be nonnegative\n\ |
| 789 | * at least one of 'a' or 'b' must be nonzero\n\ |
| 790 | * modulo must be nonzero and less than 10**prec in absolute value\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 791 | \n\ |
| 792 | \n"); |
| 793 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 794 | PyDoc_STRVAR(doc_ctx_quantize, |
| 795 | "quantize($self, x, y, /)\n--\n\n\ |
| 796 | Return a value equal to x (rounded), having the exponent of y.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 797 | \n"); |
| 798 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 799 | PyDoc_STRVAR(doc_ctx_radix, |
| 800 | "radix($self, /)\n--\n\n\ |
| 801 | Return 10.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 802 | \n"); |
| 803 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 804 | PyDoc_STRVAR(doc_ctx_remainder, |
| 805 | "remainder($self, x, y, /)\n--\n\n\ |
| 806 | Return the remainder from integer division. The sign of the result,\n\ |
| 807 | if non-zero, is the same as that of the original dividend.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 808 | \n"); |
| 809 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 810 | PyDoc_STRVAR(doc_ctx_remainder_near, |
| 811 | "remainder_near($self, x, y, /)\n--\n\n\ |
| 812 | Return x - y * n, where n is the integer nearest the exact value of x / y\n\ |
| 813 | (if the result is 0 then its sign will be the sign of x).\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 814 | \n"); |
| 815 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 816 | PyDoc_STRVAR(doc_ctx_rotate, |
| 817 | "rotate($self, x, y, /)\n--\n\n\ |
| 818 | Return a copy of x, rotated by y places.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 819 | \n"); |
| 820 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 821 | PyDoc_STRVAR(doc_ctx_same_quantum, |
| 822 | "same_quantum($self, x, y, /)\n--\n\n\ |
| 823 | Return True if the two operands have the same exponent.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 824 | \n"); |
| 825 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 826 | PyDoc_STRVAR(doc_ctx_scaleb, |
| 827 | "scaleb($self, x, y, /)\n--\n\n\ |
| 828 | Return the first operand after adding the second value to its exp.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 829 | \n"); |
| 830 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 831 | PyDoc_STRVAR(doc_ctx_shift, |
| 832 | "shift($self, x, y, /)\n--\n\n\ |
| 833 | Return a copy of x, shifted by y places.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 834 | \n"); |
| 835 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 836 | PyDoc_STRVAR(doc_ctx_sqrt, |
| 837 | "sqrt($self, x, /)\n--\n\n\ |
| 838 | Square root of a non-negative number to context precision.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 839 | \n"); |
| 840 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 841 | PyDoc_STRVAR(doc_ctx_subtract, |
| 842 | "subtract($self, x, y, /)\n--\n\n\ |
| 843 | Return the difference between x and y.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 844 | \n"); |
| 845 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 846 | PyDoc_STRVAR(doc_ctx_to_eng_string, |
| 847 | "to_eng_string($self, x, /)\n--\n\n\ |
| 848 | Convert a number to a string, using engineering notation.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 849 | \n"); |
| 850 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 851 | PyDoc_STRVAR(doc_ctx_to_integral, |
| 852 | "to_integral($self, x, /)\n--\n\n\ |
| 853 | Identical to to_integral_value(x).\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 854 | \n"); |
| 855 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 856 | PyDoc_STRVAR(doc_ctx_to_integral_exact, |
| 857 | "to_integral_exact($self, x, /)\n--\n\n\ |
| 858 | Round to an integer. Signal if the result is rounded or inexact.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 859 | \n"); |
| 860 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 861 | PyDoc_STRVAR(doc_ctx_to_integral_value, |
| 862 | "to_integral_value($self, x, /)\n--\n\n\ |
| 863 | Round to an integer.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 864 | \n"); |
| 865 | |
Stefan Krah | 5de1f82 | 2014-05-01 15:53:42 +0200 | [diff] [blame] | 866 | PyDoc_STRVAR(doc_ctx_to_sci_string, |
| 867 | "to_sci_string($self, x, /)\n--\n\n\ |
| 868 | Convert a number to a string using scientific notation.\n\ |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 869 | \n"); |
| 870 | |
| 871 | |
| 872 | #endif /* DOCSTRINGS_H */ |
| 873 | |
| 874 | |
| 875 | |