public static boolean isDangerous(double d){
  return Double.isInfinite(d) || Double.isNaN(d) || d == 0.0;
}

public static boolean isDangerous ( double d ) { return Double . isInfinite ( d ) || Double . isNaN ( d ) || d == 0.0 ; }
returns true if the argument is a " dangerous " double to have around , namely one that is infinite , nan or zero .
