Have problems in precision with python
I have the following code:
def myproc(b,a):
return b-(((b*a)/(a*a) if a*a !=0 else 0) *a)
b and a are objects of type Vec. The return valu is Vec object as well.
>>> myproc(list2vec([1, 1, 4]), list2vec([1, 2,-1]))
Vec({0, 1, 2},{0: 1.2, 1: 1.4, 2: 3.8})
Note: list2vec to convert from list to vec object
My problem is that I need the values to be returned in full precision.
i.e, 1.2, 1.4, 3.8 need to be something like 1.2xxxxx etc.
I could not solve this problem.
No comments:
Post a Comment