false
])
get_second_largest
returns the second largest floating point number of the type specified the template paramater Real. If verbose istrue
, messages are printed to standard output.This function is used for setting the value of
MAX_REAL
. See Global Constants and Variables.
get_second_largest
depends on there being an unsigned integer type with the same length as Real. This should always be the case forfloat
anddouble
, but may not belong double
.MAX_VAL should be the largest number of type Real on a given architecture. The GNU C++ compiler GCC 3.3 does not currently supply the
numeric_limits
template, so it is necessary to pass one of the macrosFLT_MAX
orDBL_MAX
explicitly, depending on which specialization you use1. When and if GCC supplies thenumeric_limits
template, I will eliminate the MAX_REAL argument.
[1] If your system supplies an unsigned integer type with the same
length as long double
, then you can instantiate
get_second_largest<long double>()
and call
‘get_second_largest<long double>(LDBL_MAX)’. However, I doubt
that this amount of precision would be worthwhile. If it ever were
required, 3DLDF would have to be changed in other ways, too. In
particular, it would have to use more precise trigonometric functions
for rotations. See Accuracy.