On Sep 30, 2005, at 12:18 PM, John Maddock wrote:
I'm aware of those nasties, but <cmath> is *not* part of the current submission, well that's my excuse anyway. Basically hypot/log1p/expm1 are some internals I needed and it seems a shame not to expose them in Boost.Math.
<nod> Fair enough.
Also do we want to support infinities and nans?
assert(hypot(INFINITY, sqrt(-1.)) == INFINITY);
Hmm, what does C99 say about this, I can see anything obvious at first glance? Your suggestion matches what the complex number functions are required to do however, so it's probably in there somewhere, I just can't see it at present.
Annex F is the place to look. It is optional. You state your intention to conform to it with: #define __STDC_IEC_559_ _ Lots of good stuff in there. hypot is convered in F.9.4.3. -Howard