solve m - M = 5 log(d/10) for d