reuse code from already written MaxRelDiff() function
using C++ variants of angular functions