Re: [COMMITTERS] pgsql: Put back ERANGE test in dpow().

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)postgresql(dot)org>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Put back ERANGE test in dpow().
Date: 2007-01-06 02:54:45
Message-ID: 200701060254.l062sjE05206@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-patches

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(-1e300, 2) == Inf,
not -Inf. But of course, that is going throw an error anyway, so either
we care about the sign of the Inf and try to get it right using isinf(),
or we just ignore it and use +Inf always.

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2007-01-06 03:14:19 pgsql: Fix markup because lc_numeric didn't have an SGML tag in this
Previous Message Tom Lane 2007-01-06 02:28:38 pgsql: Put back ERANGE test in dpow().

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-01-06 03:21:25 Re: A patch to pg_regress for Windows port
Previous Message Tom Lane 2007-01-06 02:28:38 pgsql: Put back ERANGE test in dpow().