Lines Matching refs:ExtendedContext
43 >>> setcontext(ExtendedContext)
123 'DefaultContext', 'BasicContext', 'ExtendedContext',
415 if context in (DefaultContext, BasicContext, ExtendedContext):
456 if context in (DefaultContext, BasicContext, ExtendedContext):
477 with localcontext(ExtendedContext):
492 >>> with localcontext(ExtendedContext):
3964 >>> ExtendedContext.abs(Decimal('2.1'))
3966 >>> ExtendedContext.abs(Decimal('-100'))
3968 >>> ExtendedContext.abs(Decimal('101.5'))
3970 >>> ExtendedContext.abs(Decimal('-101.5'))
3972 >>> ExtendedContext.abs(-1)
3981 >>> ExtendedContext.add(Decimal('12'), Decimal('7.00'))
3983 >>> ExtendedContext.add(Decimal('1E+2'), Decimal('1.01E+4'))
3985 >>> ExtendedContext.add(1, Decimal(2))
3987 >>> ExtendedContext.add(Decimal(8), 5)
3989 >>> ExtendedContext.add(5, 5)
4008 >>> ExtendedContext.canonical(Decimal('2.50'))
4027 >>> ExtendedContext.compare(Decimal('2.1'), Decimal('3'))
4029 >>> ExtendedContext.compare(Decimal('2.1'), Decimal('2.1'))
4031 >>> ExtendedContext.compare(Decimal('2.1'), Decimal('2.10'))
4033 >>> ExtendedContext.compare(Decimal('3'), Decimal('2.1'))
4035 >>> ExtendedContext.compare(Decimal('2.1'), Decimal('-3'))
4037 >>> ExtendedContext.compare(Decimal('-3'), Decimal('2.1'))
4039 >>> ExtendedContext.compare(1, 2)
4041 >>> ExtendedContext.compare(Decimal(1), 2)
4043 >>> ExtendedContext.compare(1, Decimal(2))
4055 >>> c = ExtendedContext
4091 >>> ExtendedContext.compare_total(Decimal('12.73'), Decimal('127.9'))
4093 >>> ExtendedContext.compare_total(Decimal('-127'), Decimal('12'))
4095 >>> ExtendedContext.compare_total(Decimal('12.30'), Decimal('12.3'))
4097 >>> ExtendedContext.compare_total(Decimal('12.30'), Decimal('12.30'))
4099 >>> ExtendedContext.compare_total(Decimal('12.3'), Decimal('12.300'))
4101 >>> ExtendedContext.compare_total(Decimal('12.3'), Decimal('NaN'))
4103 >>> ExtendedContext.compare_total(1, 2)
4105 >>> ExtendedContext.compare_total(Decimal(1), 2)
4107 >>> ExtendedContext.compare_total(1, Decimal(2))
4124 >>> ExtendedContext.copy_abs(Decimal('2.1'))
4126 >>> ExtendedContext.copy_abs(Decimal('-100'))
4128 >>> ExtendedContext.copy_abs(-1)
4137 >>> ExtendedContext.copy_decimal(Decimal('2.1'))
4139 >>> ExtendedContext.copy_decimal(Decimal('-1.00'))
4141 >>> ExtendedContext.copy_decimal(1)
4150 >>> ExtendedContext.copy_negate(Decimal('101.5'))
4152 >>> ExtendedContext.copy_negate(Decimal('-101.5'))
4154 >>> ExtendedContext.copy_negate(1)
4166 >>> ExtendedContext.copy_sign(Decimal( '1.50'), Decimal('7.33'))
4168 >>> ExtendedContext.copy_sign(Decimal('-1.50'), Decimal('7.33'))
4170 >>> ExtendedContext.copy_sign(Decimal( '1.50'), Decimal('-7.33'))
4172 >>> ExtendedContext.copy_sign(Decimal('-1.50'), Decimal('-7.33'))
4174 >>> ExtendedContext.copy_sign(1, -2)
4176 >>> ExtendedContext.copy_sign(Decimal(1), -2)
4178 >>> ExtendedContext.copy_sign(1, Decimal(-2))
4187 >>> ExtendedContext.divide(Decimal('1'), Decimal('3'))
4189 >>> ExtendedContext.divide(Decimal('2'), Decimal('3'))
4191 >>> ExtendedContext.divide(Decimal('5'), Decimal('2'))
4193 >>> ExtendedContext.divide(Decimal('1'), Decimal('10'))
4195 >>> ExtendedContext.divide(Decimal('12'), Decimal('12'))
4197 >>> ExtendedContext.divide(Decimal('8.00'), Decimal('2'))
4199 >>> ExtendedContext.divide(Decimal('2.400'), Decimal('2.0'))
4201 >>> ExtendedContext.divide(Decimal('1000'), Decimal('100'))
4203 >>> ExtendedContext.divide(Decimal('1000'), Decimal('1'))
4205 >>> ExtendedContext.divide(Decimal('2.40E+6'), Decimal('2'))
4207 >>> ExtendedContext.divide(5, 5)
4209 >>> ExtendedContext.divide(Decimal(5), 5)
4211 >>> ExtendedContext.divide(5, Decimal(5))
4224 >>> ExtendedContext.divide_int(Decimal('2'), Decimal('3'))
4226 >>> ExtendedContext.divide_int(Decimal('10'), Decimal('3'))
4228 >>> ExtendedContext.divide_int(Decimal('1'), Decimal('0.3'))
4230 >>> ExtendedContext.divide_int(10, 3)
4232 >>> ExtendedContext.divide_int(Decimal(10), 3)
4234 >>> ExtendedContext.divide_int(10, Decimal(3))
4247 >>> ExtendedContext.divmod(Decimal(8), Decimal(3))
4249 >>> ExtendedContext.divmod(Decimal(8), Decimal(4))
4251 >>> ExtendedContext.divmod(8, 4)
4253 >>> ExtendedContext.divmod(Decimal(8), 4)
4255 >>> ExtendedContext.divmod(8, Decimal(4))
4268 >>> c = ExtendedContext.copy()
4296 >>> ExtendedContext.fma(Decimal('3'), Decimal('5'), Decimal('7'))
4298 >>> ExtendedContext.fma(Decimal('3'), Decimal('-5'), Decimal('7'))
4300 >>> ExtendedContext.fma(Decimal('888565290'), Decimal('1557.96930'), Decimal('-86087.7578'))
4302 >>> ExtendedContext.fma(1, 3, 4)
4304 >>> ExtendedContext.fma(1, Decimal(3), 4)
4306 >>> ExtendedContext.fma(1, 3, Decimal(4))
4318 >>> ExtendedContext.is_canonical(Decimal('2.50'))
4329 >>> ExtendedContext.is_finite(Decimal('2.50'))
4331 >>> ExtendedContext.is_finite(Decimal('-0.3'))
4333 >>> ExtendedContext.is_finite(Decimal('0'))
4335 >>> ExtendedContext.is_finite(Decimal('Inf'))
4337 >>> ExtendedContext.is_finite(Decimal('NaN'))
4339 >>> ExtendedContext.is_finite(1)
4348 >>> ExtendedContext.is_infinite(Decimal('2.50'))
4350 >>> ExtendedContext.is_infinite(Decimal('-Inf'))
4352 >>> ExtendedContext.is_infinite(Decimal('NaN'))
4354 >>> ExtendedContext.is_infinite(1)
4364 >>> ExtendedContext.is_nan(Decimal('2.50'))
4366 >>> ExtendedContext.is_nan(Decimal('NaN'))
4368 >>> ExtendedContext.is_nan(Decimal('-sNaN'))
4370 >>> ExtendedContext.is_nan(1)
4380 >>> c = ExtendedContext.copy()
4402 >>> ExtendedContext.is_qnan(Decimal('2.50'))
4404 >>> ExtendedContext.is_qnan(Decimal('NaN'))
4406 >>> ExtendedContext.is_qnan(Decimal('sNaN'))
4408 >>> ExtendedContext.is_qnan(1)
4417 >>> ExtendedContext.is_signed(Decimal('2.50'))
4419 >>> ExtendedContext.is_signed(Decimal('-12'))
4421 >>> ExtendedContext.is_signed(Decimal('-0'))
4423 >>> ExtendedContext.is_signed(8)
4425 >>> ExtendedContext.is_signed(-8)
4435 >>> ExtendedContext.is_snan(Decimal('2.50'))
4437 >>> ExtendedContext.is_snan(Decimal('NaN'))
4439 >>> ExtendedContext.is_snan(Decimal('sNaN'))
4441 >>> ExtendedContext.is_snan(1)
4450 >>> c = ExtendedContext.copy()
4472 >>> ExtendedContext.is_zero(Decimal('0'))
4474 >>> ExtendedContext.is_zero(Decimal('2.50'))
4476 >>> ExtendedContext.is_zero(Decimal('-0E+2'))
4478 >>> ExtendedContext.is_zero(1)
4480 >>> ExtendedContext.is_zero(0)
4489 >>> c = ExtendedContext.copy()
4511 >>> c = ExtendedContext.copy()
4544 >>> ExtendedContext.logb(Decimal('250'))
4546 >>> ExtendedContext.logb(Decimal('2.50'))
4548 >>> ExtendedContext.logb(Decimal('0.03'))
4550 >>> ExtendedContext.logb(Decimal('0'))
4552 >>> ExtendedContext.logb(1)
4554 >>> ExtendedContext.logb(10)
4556 >>> ExtendedContext.logb(100)
4567 >>> ExtendedContext.logical_and(Decimal('0'), Decimal('0'))
4569 >>> ExtendedContext.logical_and(Decimal('0'), Decimal('1'))
4571 >>> ExtendedContext.logical_and(Decimal('1'), Decimal('0'))
4573 >>> ExtendedContext.logical_and(Decimal('1'), Decimal('1'))
4575 >>> ExtendedContext.logical_and(Decimal('1100'), Decimal('1010'))
4577 >>> ExtendedContext.logical_and(Decimal('1111'), Decimal('10'))
4579 >>> ExtendedContext.logical_and(110, 1101)
4581 >>> ExtendedContext.logical_and(Decimal(110), 1101)
4583 >>> ExtendedContext.logical_and(110, Decimal(1101))
4594 >>> ExtendedContext.logical_invert(Decimal('0'))
4596 >>> ExtendedContext.logical_invert(Decimal('1'))
4598 >>> ExtendedContext.logical_invert(Decimal('111111111'))
4600 >>> ExtendedContext.logical_invert(Decimal('101010101'))
4602 >>> ExtendedContext.logical_invert(1101)
4613 >>> ExtendedContext.logical_or(Decimal('0'), Decimal('0'))
4615 >>> ExtendedContext
4617 >>> ExtendedContext.logical_or(Decimal('1'), Decimal('0'))
4619 >>> ExtendedContext.logical_or(Decimal('1'), Decimal('1'))
4621 >>> ExtendedContext.logical_or(Decimal('1100'), Decimal('1010'))
4623 >>> ExtendedContext.logical_or(Decimal('1110'), Decimal('10'))
4625 >>> ExtendedContext.logical_or(110, 1101)
4627 >>> ExtendedContext.logical_or(Decimal(110), 1101)
4629 >>> ExtendedContext.logical_or(110, Decimal(1101))
4640 >>> ExtendedContext.logical_xor(Decimal('0'), Decimal('0'))
4642 >>> ExtendedContext.logical_xor(Decimal('0'), Decimal('1'))
4644 >>> ExtendedContext.logical_xor(Decimal('1'), Decimal('0'))
4646 >>> ExtendedContext.logical_xor(Decimal('1'), Decimal('1'))
4648 >>> ExtendedContext.logical_xor(Decimal('1100'), Decimal('1010'))
4650 >>> ExtendedContext.logical_xor(Decimal('1111'), Decimal('10'))
4652 >>> ExtendedContext.logical_xor(110, 1101)
4654 >>> ExtendedContext.logical_xor(Decimal(110), 1101)
4656 >>> ExtendedContext.logical_xor(110, Decimal(1101))
4671 >>> ExtendedContext.max(Decimal('3'), Decimal('2'))
4673 >>> ExtendedContext.max(Decimal('-10'), Decimal('3'))
4675 >>> ExtendedContext.max(Decimal('1.0'), Decimal('1'))
4677 >>> ExtendedContext.max(Decimal('7'), Decimal('NaN'))
4679 >>> ExtendedContext.max(1, 2)
4681 >>> ExtendedContext.max(Decimal(1), 2)
4683 >>> ExtendedContext.max(1, Decimal(2))
4692 >>> ExtendedContext.max_mag(Decimal('7'), Decimal('NaN'))
4694 >>> ExtendedContext.max_mag(Decimal('7'), Decimal('-10'))
4696 >>> ExtendedContext.max_mag(1, -2)
4698 >>> ExtendedContext.max_mag(Decimal(1), -2)
4700 >>> ExtendedContext.max_mag(1, Decimal(-2))
4715 >>> ExtendedContext.min(Decimal('3'), Decimal('2'))
4717 >>> ExtendedContext.min(Decimal('-10'), Decimal('3'))
4719 >>> ExtendedContext.min(Decimal('1.0'), Decimal('1'))
4721 >>> ExtendedContext.min(Decimal('7'), Decimal('NaN'))
4723 >>> ExtendedContext.min(1, 2)
4725 >>> ExtendedContext.min(Decimal(1), 2)
4727 >>> ExtendedContext.min(1, Decimal(29))
4736 >>> ExtendedContext.min_mag(Decimal('3'), Decimal('-2'))
4738 >>> ExtendedContext.min_mag(Decimal('-3'), Decimal('NaN'))
4740 >>> ExtendedContext.min_mag(1, -2)
4742 >>> ExtendedContext.min_mag(Decimal(1), -2)
4744 >>> ExtendedContext.min_mag(1, Decimal(-2))
4757 >>> ExtendedContext.minus(Decimal('1.3'))
4759 >>> ExtendedContext.minus(Decimal('-1.3'))
4761 >>> ExtendedContext.minus(1)
4775 >>> ExtendedContext.multiply(Decimal('1.20'), Decimal('3'))
4777 >>> ExtendedContext.multiply(Decimal('7'), Decimal('3'))
4779 >>> ExtendedContext.multiply(Decimal('0.9'), Decimal('0.8'))
4781 >>> ExtendedContext.multiply(Decimal('0.9'), Decimal('-0'))
4783 >>> ExtendedContext.multiply(Decimal('654321'), Decimal('654321'))
4785 >>> ExtendedContext.multiply(7, 7)
4787 >>> ExtendedContext.multiply(Decimal(7), 7)
4789 >>> ExtendedContext.multiply(7, Decimal(7))
4802 >>> c = ExtendedContext.copy()
4805 >>> ExtendedContext.next_minus(Decimal('1'))
4809 >>> ExtendedContext.next_minus(Decimal('-1.00000003'))
4822 >>> c = ExtendedContext.copy()
4825 >>> ExtendedContext.next_plus(Decimal('1'))
4829 >>> ExtendedContext.next_plus(Decimal('-1.00000003'))
4847 >>> c = ExtendedContext.copy()
4880 >>> ExtendedContext.normalize(Decimal('2.1'))
4882 >>> ExtendedContext.normalize(Decimal('-2.0'))
4884 >>> ExtendedContext.normalize(Decimal('1.200'))
4886 >>> ExtendedContext.normalize(Decimal('-120'))
4888 >>> ExtendedContext.normalize(Decimal('120.00'))
4890 >>> ExtendedContext.normalize(Decimal('0.00'))
4892 >>> ExtendedContext.normalize(6)
4913 >>> c = Context(ExtendedContext)
4955 >>> ExtendedContext.plus(Decimal('1.3'))
4957 >>> ExtendedContext.plus(Decimal('-1.3'))
4959 >>> ExtendedContext.plus(-1)
4987 >>> c = ExtendedContext.copy()
5031 >>> ExtendedContext.power(7, 7)
5033 >>> ExtendedContext.power(Decimal(7), 7)
5035 >>> ExtendedContext.power(7, Decimal(7), 2)
5063 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.001'))
5065 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.01'))
5067 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.1'))
5069 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('1e+0'))
5071 >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('1e+1'))
5073 >>> ExtendedContext.quantize(Decimal('-Inf'), Decimal('Infinity'))
5075 >>> ExtendedContext.quantize(Decimal('2'), Decimal('Infinity'))
5077 >>> ExtendedContext.quantize(Decimal('-0.1'), Decimal('1'))
5079 >>> ExtendedContext.quantize(Decimal('-0'), Decimal('1e+5'))
5081 >>> ExtendedContext.quantize(Decimal('+35236450.6'), Decimal('1e-2'))
5083 >>> ExtendedContext.quantize(Decimal('-35236450.6'), Decimal('1e-2'))
5085 >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e-1'))
5087 >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e-0'))
5089 >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e+1'))
5091 >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e+2'))
5093 >>> ExtendedContext.quantize(1, 2)
5095 >>> ExtendedContext.quantize(Decimal(1), 2)
5097 >>> ExtendedContext.quantize(1, Decimal(2))
5106 >>> ExtendedContext.radix()
5123 >>> ExtendedContext.remainder(Decimal('2.1'), Decimal('3'))
5125 >>> ExtendedContext.remainder(Decimal('10'), Decimal('3'))
5127 >>> ExtendedContext.remainder(Decimal('-10'), Decimal('3'))
5129 >>> ExtendedContext.remainder(Decimal('10.2'), Decimal('1'))
5131 >>> ExtendedContext.remainder(Decimal('10'), Decimal('0.3'))
5133 >>> ExtendedContext.remainder(Decimal('3.6'), Decimal('1.3'))
5135 >>> ExtendedContext.remainder(22, 6)
5137 >>> ExtendedContext.remainder(Decimal(22), 6)
5139 >>> ExtendedContext.remainder(22, Decimal(6))
5159 >>> ExtendedContext.remainder_near(Decimal('2.1'), Decimal('3'))
5161 >>> ExtendedContext.remainder_near(Decimal('10'), Decimal('6'))
5163 >>> ExtendedContext.remainder_near(Decimal('10'), Decimal('3'))
5165 >>> ExtendedContext.remainder_near(Decimal('-10'), Decimal('3'))
5167 >>> ExtendedContext.remainder_near(Decimal('10.2'), Decimal('1'))
5169 >>> ExtendedContext.remainder_near(Decimal('10'), Decimal('0.3'))
5171 >>> ExtendedContext.remainder_near(Decimal('3.6'), Decimal('1.3'))
5173 >>> ExtendedContext.remainder_near(3, 11)
5175 >>> ExtendedContext.remainder_near(Decimal(3), 11)
5177 >>> ExtendedContext.remainder_near(3, Decimal(11))
5192 >>> ExtendedContext.rotate(Decimal('34'), Decimal('8'))
5194 >>> ExtendedContext.rotate(Decimal('12'), Decimal('9'))
5196 >>> ExtendedContext.rotate(Decimal('123456789'), Decimal('-2'))
5198 >>> ExtendedContext.rotate(Decimal('123456789'), Decimal('0'))
5200 >>> ExtendedContext.rotate(Decimal('123456789'), Decimal('+2'))
5202 >>> ExtendedContext.rotate(1333333, 1)
5204 >>> ExtendedContext.rotate(Decimal(1333333), 1)
5206 >>> ExtendedContext.rotate(1333333, Decimal(1))
5218 >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('0.001'))
5220 >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('0.01'))
5222 >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('1'))
5224 >>> ExtendedContext.same_quantum(Decimal('Inf'), Decimal('-Inf'))
5226 >>> ExtendedContext.same_quantum(10000, -1)
5228 >>> ExtendedContext.same_quantum(Decimal(10000), -1)
5230 >>> ExtendedContext.same_quantum(10000, Decimal(-1))
5239 >>> ExtendedContext.scaleb(Decimal('7.50'), Decimal('-2'))
5241 >>> ExtendedContext.scaleb(Decimal('7.50'), Decimal('0'))
5243 >>> ExtendedContext.scaleb(Decimal('7.50'), Decimal('3'))
5245 >>> ExtendedContext.scaleb(1, 4)
5247 >>> ExtendedContext.scaleb(Decimal(1), 4)
5249 >>> ExtendedContext.scaleb(1, Decimal(4))
5265 >>> ExtendedContext.shift(Decimal('34'), Decimal('8'))
5267 >>> ExtendedContext.shift(Decimal('12'), Decimal('9'))
5269 >>> ExtendedContext.shift(Decimal('123456789'), Decimal('-2'))
5271 >>> ExtendedContext.shift(Decimal('123456789'), Decimal('0'))
5273 >>> ExtendedContext.shift(Decimal('123456789'), Decimal('+2'))
5275 >>> ExtendedContext.shift(88888888, 2)
5277 >>> ExtendedContext.shift(Decimal(88888888), 2)
5279 >>> ExtendedContext.shift(88888888, Decimal(2))
5291 >>> ExtendedContext.sqrt(Decimal('0'))
5293 >>> ExtendedContext.sqrt(Decimal('-0'))
5295 >>> ExtendedContext.sqrt(Decimal('0.39'))
5297 >>> ExtendedContext.sqrt(Decimal('100'))
5299 >>> ExtendedContext.sqrt(Decimal('1'))
5301 >>> ExtendedContext.sqrt(Decimal('1.0'))
5303 >>> ExtendedContext.sqrt(Decimal('1.00'))
5305 >>> ExtendedContext.sqrt(Decimal('7'))
5307 >>> ExtendedContext.sqrt(Decimal('10'))
5309 >>> ExtendedContext.sqrt(2)
5311 >>> ExtendedContext.prec
5320 >>> ExtendedContext.subtract(Decimal('1.3'), Decimal('1.07'))
5322 >>> ExtendedContext.subtract(Decimal('1.3'), Decimal('1.30'))
5324 >>> ExtendedContext.subtract(Decimal('1.3'), Decimal('2.07'))
5326 >>> ExtendedContext.subtract(8, 5)
5328 >>> ExtendedContext.subtract(Decimal(8), 5)
5330 >>> ExtendedContext.subtract(8, Decimal(5))
5349 >>> ExtendedContext.to_eng_string(Decimal('123E+1'))
5351 >>> ExtendedContext.to_eng_string(Decimal('123E+3'))
5353 >>> ExtendedContext.to_eng_string(Decimal('123E-10'))
5355 >>> ExtendedContext.to_eng_string(Decimal('-123E-12'))
5357 >>> ExtendedContext.to_eng_string(Decimal('7E-7'))
5359 >>> ExtendedContext.to_eng_string(Decimal('7E+1'))
5361 >>> ExtendedContext.to_eng_string(Decimal('0E+1'))
5386 >>> ExtendedContext.to_integral_exact(Decimal('2.1'))
5388 >>> ExtendedContext.to_integral_exact(Decimal('100'))
5390 >>> ExtendedContext.to_integral_exact(Decimal('100.0'))
5392 >>> ExtendedContext.to_integral_exact(Decimal('101.5'))
5394 >>> ExtendedContext.to_integral_exact(Decimal('-101.5'))
5396 >>> ExtendedContext.to_integral_exact(Decimal('10E+5'))
5398 >>> ExtendedContext.to_integral_exact(Decimal('7.89E+77'))
5400 >>> ExtendedContext.to_integral_exact(Decimal('-Inf'))
5415 >>> ExtendedContext.to_integral_value(Decimal('2.1'))
5417 >>> ExtendedContext.to_integral_value(Decimal('100'))
5419 >>> ExtendedContext.to_integral_value(Decimal('100.0'))
5421 >>> ExtendedContext.to_integral_value(Decimal('101.5'))
5423 >>> ExtendedContext.to_integral_value(Decimal('-101.5'))
5425 >>> ExtendedContext.to_integral_value(Decimal('10E+5'))
5427 >>> ExtendedContext.to_integral_value(Decimal('7.89E+77'))
5429 >>> ExtendedContext.to_integral_value(Decimal('-Inf'))
5899 ExtendedContext = Context(