use isgreater
What's the benefit of using std::isgreater? It's more verbose. Also some of these changes look like they would change behavior. For example, replacing != with std::isgreater` doesn't look right.
the original idea came from https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-integer-sign-comparison.html
Comparing a float number against 0 is also not quite safe.
I see. According to this document, isgreater behaves exactly the same as >, except it will never trigger an exception. I assume the word "exception" here means a SIGFPE rather than a C++ exception which we could catch. That sounds like a good change for us, because I don't think we ever want to trigger a SIGFPE, especially when we're used as a library rather than as a standalone application.
But please don't replace the == and != operators, because that could change the behavior of the code. Also, there's no need because those operators are non-signaling.
@neheb: Please could you revert the changes to the == and != operators? I think we should only replace the > operator.