Calculate relative error of two numbers:
\frac{|a - b|}{\max(|a|,|b|)}
It lies in [0,1) interval for numbers with same sign and (1,2] for numbers with different sign. If both arguments are zero or negative zero function returns 0. If at least one argument is transfinite it returns NaN