decimal.Context.fma()

fma(x, y, z) Returns x multiplied by y, plus z.

decimal.Context.exp()

exp(x) Returns e ** x.

decimal.Context.Etop()

Etop() Returns a value equal to Emax - prec + 1.

decimal.Context.Etiny()

Etiny() Returns a value equal to Emin - prec + 1 which is the minimum exponent value for subnormal results. When underflow occurs, the exponent is set to Etiny.

decimal.Context.divmod()

divmod(x, y) Divides two numbers and returns the integer part of the result.

decimal.Context.divide_int()

divide_int(x, y) Return x divided by y, truncated to an integer.

decimal.Context.divide()

divide(x, y) Return x divided by y.

decimal.Context.create_decimal_from_float()

create_decimal_from_float(f) Creates a new Decimal instance from a float f but rounding using self as the context. Unlike the Decimal.from_float() class method, the context precision, rounding method, flags, and traps are applied to the conversion. >>> context = Context(prec=5, rounding=ROUND_DOWN) >>> context.create_decimal_from_float(math.pi) Decimal('3.1415') >>> context = Context(prec=5, traps=[Inexact]) >>> context.create_decimal_from_float(math.pi) T

decimal.Context.create_decimal()

create_decimal(num) Creates a new Decimal instance from num but using self as context. Unlike the Decimal constructor, the context precision, rounding method, flags, and traps are applied to the conversion. This is useful because constants are often given to a greater precision than is needed by the application. Another benefit is that rounding immediately eliminates unintended effects from digits beyond the current precision. In the following example, using unrounded inputs means that addin

decimal.Context.copy_sign()

copy_sign(x, y) Copies the sign from y to x.