The code I'm converting from Fortran to C++ contains the spacing(x) function. From the description, spacing(x) returns the
Smallest distance between two numbers of a given type
and
Determines the distance between the argument X and the nearest adjacent number of the same type.
Is there a C++ equivalent function or, if not, how do I implement that function in C++?