public double adjustedPow10(double val){
  boolean negFlag=(val < 0.0);
  if (negFlag) {
    val=-val;
  }
  double res;
  if (val < 1.0) {
    res=(Math.pow(10,val + 1.0) - 10.0) / 9.0;
  }
 else {
    res=Math.pow(10,val);
  }
  return negFlag ? (-res) : res;
}

public double adjustedPow10 ( double val ) { boolean negFlag = ( val < 0.0 ) ; if ( negFlag ) { val = - val ; } double res ; if ( val < 1.0 ) { res = ( Math . pow ( 10 , val + 1.0 ) - 10.0 ) / 9.0 ; } else { res = Math . pow ( 10 , val ) ; } return negFlag ? ( - res ) : res ; }
returns an adjusted power of 10 value for graphing purposes . the first adjustment is that negative values are changed to positive during the calculations , and then the answer is negated at the end . the second is that , for values less than 1 , a progressive logarithmic offset is subtracted such that at 0 the returned result is also 0 .
