side of the array being partitioned to save on stack space. Greater
savings can be gained by choosing recursion for the smaller side
of the partition and eliminating recursion for the larger side.
This also results in a small but measurable performance gain.
(From OpenBSD)
The entries in the NAME section of these man pages have man pages of their
own, so it doesn't make sense to have their names here, instead they
should be just described in the body (similar to what we do in math(3) man page).
This also helps whatis(1) and apropos(1), as otherwise you would see multiple
results with the same name in the output, while there is actually only one page
with that name.
Good example is:
$ apropos -n 2 -M realloc
realloc (3) general memory allocation operations
realloc (3) general purpose memory allocation functions
The first line is there because memory(3) man page had realloc in its
NAME section. This commit will fix this issue.
ok wiz@
Either an out-of-band channel, or an in-band sentinel value, could
indicate an error, but an out-of-band sentinel value is a silly
proposition.
Noted by uwe@.
Do use the technical terms `overflow' and `underflow', because strtod
sets ERANGE precisely to indicate either of these two conditions, and
they are the right keywords that one might be looking for.
Note that strtod may set ERANGE even if it returns noninfinity and
nonzero -- specifically, if the result is subnormal. This part was
wrong before I `fixed' it and remained wrong after I `fixed' it
earlier this year.
For a floating-point computation, in the language of IEEE 754,
`underflow' means the output was rounded and is too small to be
represented *normally*.
There are many nonzero floating-point numbers to which the exact
output may have been rounded -- namely subnormals. The condition
under which strtod returns ERANGE for small magnitudes is when the
magnitude of the exact result is so small it is rounded to zero, not
even to a subnormal.
While here, use parallel language about large magnitudes instead of
the (albeit correct) word `overflow', to avoid temptation to treat
`underflow' as the opposite notion with zero instead of infinity.
Make this work on !NetBSD platforms:
- replace __CTASSERT() with platform agnostic solution SQRT_SIZE_MAX
- include nbtool_config.h for cross builds to get definition of __RCSID()
- restore errno in the last rare code path for platforms affecting errno(2)
in memcpy(2)
While there: rename parameter name 'num' to 'number' to be in sync with
the calloc(3) parameter naming.
Reported by scole_mail at the current-users ml.