public static void checkFinite(final double x) throws MathIllegalArgumentException {
  if (Double.isInfinite(x) || Double.isNaN(x)) {
    throw new MathIllegalArgumentException(LocalizedCoreFormats.NOT_FINITE_NUMBER,x);
  }
}

public static void checkFinite ( final double x ) throws MathIllegalArgumentException { if ( Double . isInfinite ( x ) || Double . isNaN ( x ) ) { throw new MathIllegalArgumentException ( LocalizedCoreFormats . NOT_FINITE_NUMBER , x ) ; } }
check that the argument is a real number .
