public static double offset(double low, double high){

        	double diff = high - low;
        	double sh = Fmath.sign(high);
        	double sl = Fmath.sign(low);
        	double offset=0.0D;
        	int eh=0, ed=0;

        	if(sh == sl){
            		ed=(int)Math.floor(Fmath.log10(diff));
            		if(sh==1){
                		eh=(int)Math.floor(Fmath.log10(high));
                		if(eh-ed>1)offset = Math.floor(low*Math.pow(10, -ed))*Math.pow(10,ed);
            		}
            		else{
                		eh=(int)Math.floor(Fmath.log10(Math.abs(low)));
                		if(eh-ed>1)offset = Math.floor(high*Math.pow(10, -ed))*Math.pow(10,ed);
            		}
        	}
        	return offset;
    	}