BUG #2153: atan2(0, 0) ERROR: input is out of range on Solaris

From: "Norman Young" <nbyoung(at)westernavionics(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2153: atan2(0, 0) ERROR: input is out of range on Solaris
Date: 2006-01-05 18:56:28
Message-ID: 20060105185628.A50CEF0A32@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2153
Logged by: Norman Young
Email address: nbyoung(at)westernavionics(dot)com
PostgreSQL version: 8.0.3
Operating system: Solaris
Description: atan2(0, 0) ERROR: input is out of range on Solaris
Details:

Solaris
=======

$ uname -a
SunOS solarishost 5.9 Generic_117171-07 sun4u sparc SUNW,Ultra-60
$ gcc --version
gcc (GCC) 3.3.2
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ psql -h solarishost -U postgres dbname
Welcome to psql 8.0.3, the PostgreSQL interactive terminal.
[snip]
comcube=# SELECT atan2(0, 0);
ERROR: input is out of range

Linux
=====
$ uname -a
Linux linuxhost 2.6.11-1.1369_FC4smp #1 SMP Thu Jun 2 23:08:39 EDT 2005 i686
i686 i386 GNU/Linux

$ rpm -qi postgresql-server-8.0.3-1
Name : postgresql-server Relocations: (not relocatable)
Version : 8.0.3 Vendor: Red Hat, Inc.
Release : 1 Build Date: Tue 10 May 2005
11:42:55 AM EDT
Install Date: Tue 30 Aug 2005 09:55:42 AM EDT Build Host:
decompose.build.redhat.com
Group : Applications/Databases Source RPM:
postgresql-8.0.3-1.src.rpm
Size : 9979759 License: BSD
Signature : DSA/SHA1, Fri 20 May 2005 01:40:20 PM EDT, Key ID
b44269d04f2a6fd2Packager : Red Hat, Inc.
<http://bugzilla.redhat.com/bugzilla>
URL : http://www.postgresql.org/
Summary : The programs needed to create and run a PostgreSQL server.

$ psql -h linuxhost -U postgres dbname
Welcome to psql 8.0.3, the PostgreSQL interactive terminal.
[snip]
comcube=# SELECT atan2(0, 0);
atan2
-------
0
(1 row)

Workaround
==========
CASE WHEN arg1=0 AND arg2=0 THEN 0 ELSE atan2(ar1, arg2)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Glauco Carlos Silva 2006-01-05 20:17:00 BUG #2154: conversion problem
Previous Message Andreas Kretschmer 2006-01-05 18:47:58 BUG #2152: psql crash reproducible