added NaN test for trace
added NaN test for trace_quad_form
added NaN test for trace_gen_quad_form
added NaN test for trace_inv_quad_form_ldlt
added NaN test for trace_gen_inv_quad_form_ldlt