Re: [HACKERS] Warning!! - Mailing list pgsql-hackers

From A James Lewis
Subject Re: [HACKERS] Warning!!
Date
Msg-id Pine.LNX.3.93.981104145654.26157A-100000@vr1-workhorse1.vrtx.net
Whole thread Raw
In response to Re: [HACKERS] Warning!!  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] Warning!!
List pgsql-hackers
It only happens here for some figues, not all....  mostly xx.x[1234]

On Wed, 4 Nov 1998, Bruce Momjian wrote:

> > > I'm very new to this list, and I have to first say that 6.4beta5 fixes
> > > every problem I had encountered with 6.3.2 (A small list..)
> > > Just now I saw and posted this...
> > > If the pence is 0-4 it rounds down... surely that's a rounding bug 
> > > because it should be looking at the next significant figure?
> > 
> > tgl=> select cash_mul_flt8('$123.77', '1');
> > cash_mul_flt8
> > -------------
> > $123.77
> > (1 row)
> > 
> > tgl=> select cash_mul_flt8('$1', '123.77');
> > cash_mul_flt8
> > -------------
> > $123.76
> > (1 row)
> > 
> > That's annoying; it's non-symmetric too. The money type is stored as an
> > integer, and the float type is an IEEE double; looks like we have an LSB
> > rounding problem. Not sure what to do about it other than remove the
> > function, which isn't desirable I'm sure...
> 
> This is really bad.  I can't imagine a 5-digit double is loosing
> rounding on a double.  There must be some other problem, but I can't
> reproduce it here on BSD/OS.
> 
> -- 
>   Bruce Momjian                        |  http://www.op.net/~candle
>   maillist@candle.pha.pa.us            |  (610) 853-3000
>   +  If your life is a hard drive,     |  830 Blythe Avenue
>   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
> 

James (james@linuxrocks.co.uk)
Vortex Internet
My Windows unders~1 long filena~1, and yours?



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Warning!!
Next
From: Sferacarta Software
Date:
Subject: Re[2]: [HACKERS] Re: bug on aggregate function AVG()