fixes abs and fabs behavior for NaN for agrad fwd and rev