Thread: BUG #4749: trigonometric functions broken
The following bug has been logged online: Bug reference: 4749 Logged by: Stefano Salvador Email address: stefano.salvador@gmail.com PostgreSQL version: 8.3.7 Operating system: Linux Description: trigonometric functions broken Details: try: select sin(pi()); returns: 1.2246 or: select cos(pi()/2); returns: 6.123 but sin and cos are limited between -1 and 1 !!! I suspect than tan() function is broken too.
On Sunday 05 April 2009 13:44:37 Stefano Salvador wrote: > select sin(pi()); > > returns: 1.2246 > > or: > > select cos(pi()/2); > > returns: 6.123 > > but sin and cos are limited between -1 and 1 !!! I get => select sin(pi()); sin ---------------------- 1.22460635382238e-16 (1 row) => select cos(pi()/2); cos ---------------------- 6.12303176911189e-17 (1 row) Apparently, your interface is truncating the output.
Stefano Salvador escreveu: > select sin(pi()); > > returns: 1.2246 > euler=# select sin(pi()); sin ---------------------- 1.22460635382238e-16 ^^^^^ It works for me. You didn't pay attention at the precision. -- Euler Taveira de Oliveira http://www.timbira.com/