2 ms·
That doesn't necessarily make the algorithm unstable. See for example: >>> import numpy as np >>> x0 = np.random.rand(1) >>> x_rnd = np.round(100*x)/100
by Majromax 7y ago
That doesn't necessarily make the algorithm unstable. See for example:
>>> import numpy as np
>>> x0 = np.random.rand(1)
>>> x_rnd = np.round(100*x)/100.0
>>> for i in range(1000):
... x = np.mod(x+np.pi,1)
... x_rnd = np.mod(x_rnd + np.pi,1)
... x_rnd = np.round(100*x)/100
...
>>> x_real = np.mod(x0+1000*np.pi,1)
>>> print(x_real,x,x_rnd)
(array([0.51013166]), array([0.51013166]), array([0.51]))
Note no loss of accuracy for all of the intermediate roundings. The accuracy is preserved because there's no mechanism here to amplify the error.
That's why I ask about the kind of algorithms typically applied to geolocated data. Off the top of my head, I can't think of anything that would be both useful and error-amplifying.