Maybe it’s not an issue of accuracy. Are you sure your Tensors are not sharing the underlying data?
Have a look at this example.
In the first case, I create a new Tensor named b, which shares the underlying data with a.
If I manipulate b, the values of a are also changed, thus the difference will be all zeros.
In the second case, I clone the values of c, so that d has it’s own data now.
a = torch.randn(10)
b = a # Share underlying data
b += 10
print(a - b)

c = torch.randn(10)
d = c.clone()
d += 10
print(d - c)

Btw, you can change the print precision with torch.set_printoptions(precision=10), if you need this, although I doubt it’s useful in this case (and for floats in general).