Returns the base 10 logarithm of the operand. >>> c = ExtendedContext.copy() >>> c.Emin = -999 >>> c.Emax = 999 >>> c.log10(Decimal('0')) Decimal('-Infinity') >>> c.log10(Decimal('0.001')) Decimal('-3') >>> c.log10(Decimal('1.000'))
(self, a)
| 4663 | return a.ln(context=self) |
| 4664 | |
| 4665 | def log10(self, a): |
| 4666 | """Returns the base 10 logarithm of the operand. |
| 4667 | |
| 4668 | >>> c = ExtendedContext.copy() |
| 4669 | >>> c.Emin = -999 |
| 4670 | >>> c.Emax = 999 |
| 4671 | >>> c.log10(Decimal('0')) |
| 4672 | Decimal('-Infinity') |
| 4673 | >>> c.log10(Decimal('0.001')) |
| 4674 | Decimal('-3') |
| 4675 | >>> c.log10(Decimal('1.000')) |
| 4676 | Decimal('0') |
| 4677 | >>> c.log10(Decimal('2')) |
| 4678 | Decimal('0.301029996') |
| 4679 | >>> c.log10(Decimal('10')) |
| 4680 | Decimal('1') |
| 4681 | >>> c.log10(Decimal('70')) |
| 4682 | Decimal('1.84509804') |
| 4683 | >>> c.log10(Decimal('+Infinity')) |
| 4684 | Decimal('Infinity') |
| 4685 | >>> c.log10(0) |
| 4686 | Decimal('-Infinity') |
| 4687 | >>> c.log10(1) |
| 4688 | Decimal('0') |
| 4689 | """ |
| 4690 | a = _convert_other(a, raiseit=True) |
| 4691 | return a.log10(context=self) |
| 4692 | |
| 4693 | def logb(self, a): |
| 4694 | """ Returns the exponent of the magnitude of the operand's MSD. |