added NaN test for inv
added NaN test for inv
added NaN and derivative doc for inv to manual