In below code, “torch.add” gives some higher floating point value. Output is tensor([98310.1016])
after roundoff tensor([98310.1016])
I want exact “98310.1” value. I try to round off but its not working. Any idea welcome.
import torch
a=torch.FloatTensor([98310])
b=0.1
arr=torch.add(a,b)
print(arr)

n_digits = 2
rounded = (arr * 10**n_digits).round() / (10**n_digits)
print("after roundoff" ,rounded)