fast log10 constraint testing