selfsimilarity.cpp:
const, a/b==a*(1/b), log(sqrt(d)) == log(d)*0.5 // faster