Python‎ > ‎decimal‎ > ‎

Decimal.min_mag()


Definition
The method subtract the values of decimals.

Syntax
Decimal(x).min_mag(y)

Parameters
x=Decimal
y=integer

The equal to:

 from decimal import Decimal
import operator

a=Decimal(1.4).min(Decimal(1))
b=Decimal(1.3).min_mag(1)
z=operator.ge(x,y)
print("The value of a is greater and equal to b:", z)
>>>
The value of a is greater and equal to b: True
>>> 



Comments