MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / next_plus

Method next_plus

tools/python-3.11.9-amd64/Lib/_pydecimal.py:5009–5027  ·  view source on GitHub ↗

Returns the smallest representable number larger than a. >>> c = ExtendedContext.copy() >>> c.Emin = -999 >>> c.Emax = 999 >>> ExtendedContext.next_plus(Decimal('1')) Decimal('1.00000001') >>> c.next_plus(Decimal('-1E-1007')) Decimal('

(self, a)

Source from the content-addressed store, hash-verified

5007 return a.next_minus(context=self)
5008
5009 def next_plus(self, a):
5010 """Returns the smallest representable number larger than a.
5011
5012 >>> c = ExtendedContext.copy()
5013 >>> c.Emin = -999
5014 >>> c.Emax = 999
5015 >>> ExtendedContext.next_plus(Decimal('1'))
5016 Decimal('1.00000001')
5017 >>> c.next_plus(Decimal('-1E-1007'))
5018 Decimal('-0E-1007')
5019 >>> ExtendedContext.next_plus(Decimal('-1.00000003'))
5020 Decimal('-1.00000002')
5021 >>> c.next_plus(Decimal('-Infinity'))
5022 Decimal('-9.99999999E+999')
5023 >>> c.next_plus(1)
5024 Decimal('1.00000001')
5025 """
5026 a = _convert_other(a, raiseit=True)
5027 return a.next_plus(context=self)
5028
5029 def next_toward(self, a, b):
5030 """Returns the number closest to a, in direction towards b.

Callers

nothing calls this directly

Calls 2

_convert_otherFunction · 0.85
next_plusMethod · 0.45

Tested by

no test coverage detected