Maximum/minimum values of int, double, long, etc....
Posted on 2003-10-31
I am often writing optimization routines that either start or are toggled off of extremum values of various datatypes. Are there any globally-defined max/min values for the various types (int, long...). For example, coming from Java, there exist things like Double.MAX_VALUE that start you off at the upper limit of double.
I realize of course I could look through a book, remember how many bits are in a long, and do the binary arithmetic, but the Java approach or something like it seems preferable.