I'm running a numerical simulation and get divergent results on different platforms because of machine precision issues. As a simple example (that I don't think actually fails, but could):
import numpy as np
np.random.seed(seed=42)
vals = np.random.rand(int(1e5))
threshold = 0.5
good_vals = np.where(vals > threshold)
Even though I've seeded the random number generator, there can be values very near the threshold that might end up evaluated above the threshold on one system and not another because of differing machine precisions. Is there a standard way to deal with this?