excellent help.

[code]scaffold=(int)(Math.pow(10,(int)(Math.log(i2)/Math.log(10.)+1.e-8)));[/code]

i assign my own variables ( scaffold and i2) substitution to modify.

thanks for the programming tip.

i read a bit before on Math.pow(a,b) which is a[sup]b[/sup]

so what you suggested is 10[sup](i2/log10 +1.e-8)[/sup]