Unix Technical Forum

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

This is a discussion on BUG #2153: atan2(0, 0) ERROR: input is out of range on Solaris within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 2153 Logged by: Norman Young Email address: nbyoung@westernavionics.com PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 09:37 AM
Norman Young
 
Posts: n/a
Default BUG #2153: atan2(0, 0) ERROR: input is out of range on Solaris


The following bug has been logged online:

Bug reference: 2153
Logged by: Norman Young
Email address: nbyoung@westernavionics.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)

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 09:37 AM
Tom Lane
 
Posts: n/a
Default Re: BUG #2153: atan2(0, 0) ERROR: input is out of range on Solaris

"Norman Young" <nbyoung@westernavionics.com> writes:
> Description: atan2(0, 0) ERROR: input is out of range on Solaris


Actually, I'd argue that it's the Linux atan2() that's broken. But
in any case, what you're looking at is a difference in the behavior
of the underlying library functions on the two platforms. We do not
try to second-guess libm ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:52 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com