Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-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

pgsql-committers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group