static long roundUpToPowerOfTen_double(double d) { ret round(exp10(max(0, ceil(log10(d))))); }