Answers for "python use getcontext"

0

python use getcontext

from decimal import getcontext, Decimal

ctx=getcontext()
num=Decimal('1.1')
num**4  //Decimal('1.4641')
ctx.prec=4  //Set new precision
print(num**4)
Posted by: Guest on October-01-2021

Python Answers by Framework

Browse Popular Code Answers by Language