Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
x.is_zero()
Bool
True
x.is_one()
x.is_integer()
x.is_negative()
x.is_positive()
x.is_odd()
x.number_of_digits()
Int
x.adjusted()
x.same_quantum(y)
as_tuple()
var parts = Decimal("7.25").as_tuple() # parts[0] = False (sign), parts[1] = [7, 2, 5] (digits), parts[2] = -2 (exponent) # sign=False, digits=[7, 2, 5], exp=-2
x.copy_abs() # Copy with positive sign x.copy_negate() # Copy with inverted sign x.copy_sign(other) # Copy of x with sign of other x.fma(a, b) # Fused multiply-add: x*a+b (exact) x.scaleb(n) # Multiply by 10^n (O(1), adjusts scale only)