Jan-16-2024, 06:03 PM
I'm having some problems with getting the desired precision, and something like this also happens.
>>> G=Decimal(0.999999999999999999999900000000000000)
>>> print(G)
1
What am I doing wrong?
See the text and image below for extra stuff, when I was working with theta. Theta was generated in the same python script and session:
import math
import decimal
from decimal import getcontext
getcontext().prec = 36
theta: 1.00000000000000010105568267120302867849435113356548754381947219371795654296875E-11
C: 1
Thank you for reading this!
>>> G=Decimal(0.999999999999999999999900000000000000)
>>> print(G)
1
What am I doing wrong?
See the text and image below for extra stuff, when I was working with theta. Theta was generated in the same python script and session:
import math
import decimal
from decimal import getcontext
getcontext().prec = 36
theta = decimal.Decimal(1/2 * math.asin(2 * (F/N)))
theta: 1.00000000000000010105568267120302867849435113356548754381947219371795654296875E-11
C = decimal.Decimal(math.cos(theta))
C: 1
Thank you for reading this!