Returns the natural (base e) logarithm of the operand. >>> c = ExtendedContext.copy() >>> c.Emin = -999 >>> c.Emax = 999 >>> c.ln(Decimal('0')) Decimal('-Infinity') >>> c.ln(Decimal('1.000')) Decimal('0') >>> c.ln(Decimal('2.71828183')
(self, a)
| 4641 | return a.is_zero() |
| 4642 | |
| 4643 | def ln(self, a): |
| 4644 | """Returns the natural (base e) logarithm of the operand. |
| 4645 | |
| 4646 | >>> c = ExtendedContext.copy() |
| 4647 | >>> c.Emin = -999 |
| 4648 | >>> c.Emax = 999 |
| 4649 | >>> c.ln(Decimal('0')) |
| 4650 | Decimal('-Infinity') |
| 4651 | >>> c.ln(Decimal('1.000')) |
| 4652 | Decimal('0') |
| 4653 | >>> c.ln(Decimal('2.71828183')) |
| 4654 | Decimal('1.00000000') |
| 4655 | >>> c.ln(Decimal('10')) |
| 4656 | Decimal('2.30258509') |
| 4657 | >>> c.ln(Decimal('+Infinity')) |
| 4658 | Decimal('Infinity') |
| 4659 | >>> c.ln(1) |
| 4660 | Decimal('0') |
| 4661 | """ |
| 4662 | a = _convert_other(a, raiseit=True) |
| 4663 | return a.ln(context=self) |
| 4664 | |
| 4665 | def log10(self, a): |
| 4666 | """Returns the base 10 logarithm of the operand. |