updated nan testing framework for fvar<fvar<double> > and fvar<fvar<var> >