public static void assertEquals(String msg,double expected,double actual,double delta){
  if (Double.isNaN(expected)) {
    Assert.assertTrue("" + actual + " is not NaN.",Double.isNaN(actual));
  }
 else {
    Assert.assertEquals(msg,expected,actual,delta);
  }
}

public static void assertEquals ( String msg , double expected , double actual , double delta ) { if ( Double . isNaN ( expected ) ) { Assert . assertTrue ( "" + actual + " is not NaN." , Double . isNaN ( actual ) ) ; } else { Assert . assertEquals ( msg , expected , actual , delta ) ; } }
verifies that expected and actual are within delta , or are both nan or infinities of the same sign .
