Return the ceiling of self, as an integer. For a finite Decimal instance self, return the least integer n such that n >= self. If self is infinite or a NaN then a Python exception is raised.
(self)
| 1859 | return int(self._rescale(0, ROUND_FLOOR)) |
| 1860 | |
| 1861 | def __ceil__(self): |
| 1862 | """Return the ceiling of self, as an integer. |
| 1863 | |
| 1864 | For a finite Decimal instance self, return the least integer n |
| 1865 | such that n >= self. If self is infinite or a NaN then a |
| 1866 | Python exception is raised. |
| 1867 | |
| 1868 | """ |
| 1869 | if self._is_special: |
| 1870 | if self.is_nan(): |
| 1871 | raise ValueError("cannot round a NaN") |
| 1872 | else: |
| 1873 | raise OverflowError("cannot round an infinity") |
| 1874 | return int(self._rescale(0, ROUND_CEILING)) |
| 1875 | |
| 1876 | def fma(self, other, third, context=None): |
| 1877 | """Fused multiply-add. |