MCPcopy Index your code
hub / github.com/python/cpython / adjusted

Method adjusted

Lib/_pydecimal.py:2872–2878  ·  view source on GitHub ↗

Return the adjusted exponent of self

(self)

Source from the content-addressed store, hash-verified

2870 return self._int[-1+self._exp] in '02468'
2871
2872 def adjusted(self):
2873 """Return the adjusted exponent of self"""
2874 try:
2875 return self._exp + len(self._int) - 1
2876 # If NaN or Infinity, self._exp is string
2877 except TypeError:
2878 return 0
2879
2880 def canonical(self):
2881 """Returns the same Decimal object.

Callers 15

_cmpMethod · 0.95
_divideMethod · 0.95
remainder_nearMethod · 0.95
__pow__Method · 0.95
quantizeMethod · 0.95
_roundMethod · 0.95
expMethod · 0.95
is_normalMethod · 0.95
is_subnormalMethod · 0.95
logbMethod · 0.95
_power_moduloMethod · 0.80
next_towardMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_adjustedMethod · 0.64