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

BUG #3289: SIN(PI()) expected to return 0, but returns garbage

From: "Daniel Kastenholz" <mail(at)danielkastenholz(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3289: SIN(PI()) expected to return 0, but returns garbage
Date: 2007-05-17 09:48:35
Message-ID: 200705170948.l4H9mZRI040983@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      3289
Logged by:          Daniel Kastenholz
Email address:      mail(at)danielkastenholz(dot)de
PostgreSQL version: 8.1, 8.2.4
Operating system:   Linux, Windows
Description:        SIN(PI()) expected to return 0, but returns garbage
Details: 

Trouble case:

Action:
Type in SELECT SIN(PI())

Expected output:
0

Actual output:
* Windows, using 8.2.4:
  garbage (-2.2......)

* Linux, using 8.1:
  garbage (1.22.......)

--

Comments:
SIN(3.1414) and SIN(3.1417) come close to 0 and work on both platforms.
SIN(3.1415) and SIN(3.1416) produce the same garbage output as using PI() on
both platforms.

Responses

pgsql-bugs by date

Next:From: Heikki LinnakangasDate: 2007-05-17 10:38:02
Subject: Re: BUG #3289: SIN(PI()) expected to return 0, but returns garbage
Previous:From: SrinivasDate: 2007-05-17 06:55:05
Subject: BUG #3288: Select command giving error

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