public static final double nextDouble(double value){
  if (value == Double.POSITIVE_INFINITY) {
    return value;
  }
  long bits;
  if (value == 0) {
    bits=0;
  }
 else {
    bits=Double.doubleToLongBits(value);
  }
  return Double.longBitsToDouble(value < 0 ? bits - 1 : bits + 1);
}

public static final double nextDouble ( double value ) { if ( value == Double . POSITIVE_INFINITY ) { return value ; } long bits ; if ( value == 0 ) { bits = 0 ; } else { bits = Double . doubleToLongBits ( value ) ; } return Double . longBitsToDouble ( value < 0 ? bits - 1 : bits + 1 ) ; }
returns the double value which is closest to the specified double but larger .
