Might not be so bad to relax that x_noise setting a bit. 0.0001 * dx is pretty small, and when dx is as small as it is here then we are pushing into noise land anyway. Going to 0.001 would still be a pretty tight check (1 per mille).