posted 17 years ago
Depends what your definition of best is. Also, you must consider what to do when any of the doubles is NaN - that will not compare to anything.
Fast method:
There is a more generic method however, for any number of (non-NaN) numbers: