Bruce Momjian <[EMAIL PROTECTED]> writes:
> Actually, when you return ERANGE, what is 'result'? Nan? Inf? finite?
I believe it's HUGE_VAL (the largest finite value) ... which is
something I don't want to explicitly test for, any more than I liked
the explicit use of min/max values before. Your
Tom Lane wrote:
> Bruce Momjian <[EMAIL PROTECTED]> writes:
> > It ERANGE's only on Inf, not underflow? I would prefer:
> > else if (errno == ERANGE && !isinf(result))
>
> No objection to that, just don't take out the ERANGE test altogether
> again ;-)
Actually, when you return ERANGE, what
Bruce Momjian <[EMAIL PROTECTED]> writes:
> It ERANGE's only on Inf, not underflow? I would prefer:
> else if (errno == ERANGE && !isinf(result))
No objection to that, just don't take out the ERANGE test altogether
again ;-)
regards, tom lane
Tom Lane wrote:
> Log Message:
> ---
> Put back ERANGE test in dpow(). There are platforms that need this,
> like my HPPA ...
It ERANGE's only on Inf, not underflow? I would prefer:
else if (errno == ERANGE && !isinf(result))
because the sign computation isn't 100%, think pow(-1e30