Re: [HACKERS] Purpose of rscale/dscale in NUMERIC?

2002-10-02 Thread Jan Wieck
Tom Lane wrote: What is the reason for maintaining separate rscale and dscale values in numeric variables? I am finding that this arrangement leads to some odd results, for example this: regression=# select (exp(ln(2.0)) - 2.0); ?column? -

Re: [HACKERS] Purpose of rscale/dscale in NUMERIC?

2002-10-02 Thread Tom Lane
Jan Wieck [EMAIL PROTECTED] writes: Tom Lane wrote: What is the reason for maintaining separate rscale and dscale values in numeric variables? You need to carry around a decent number of digits when you divide already. Exposing them in a manner that numericcol(15,2) / 3.0 all of the sudden

Re: [HACKERS] Purpose of rscale/dscale in NUMERIC?

2002-10-02 Thread Jan Wieck
Tom Lane wrote: Jan Wieck [EMAIL PROTECTED] writes: Tom Lane wrote: What is the reason for maintaining separate rscale and dscale values in numeric variables? You need to carry around a decent number of digits when you divide already. Exposing them in a manner that numericcol(15,2)

[HACKERS] Purpose of rscale/dscale in NUMERIC?

2002-10-01 Thread Tom Lane
What is the reason for maintaining separate rscale and dscale values in numeric variables? I am finding that this arrangement leads to some odd results, for example this: regression=# select (exp(ln(2.0)) - 2.0); ?column? - -0. (1 row) regression=#