Re: float output precision questions

From: "Pedro M(dot) Ferreira" <pfrazao(at)ualg(dot)pt>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: float output precision questions
Date: 2002-10-31 17:58:51
Message-ID: 3DC16F5B.3070109@ualg.pt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
>
> Bottom line: if DBL_DIG=15 and the float arithmetic is binary, then
> there are some double values that require 17 displayed digits to
> distinguish, even though not all 16-digit numbers are distinct.
>
> So I retract my original proposal and instead suggest that we offer
> a switch to display either DBL_DIG or DBL_DIG+2 significant digits
> (and correspondingly increase the digits for float4). The DBL_DIG+2
> case should handle the need for exact dump/reload.

Nice. This will be good for number storage purposes.

Shall it be done with two parameters, 'DOUBLE_FORMAT' and
'SINGLE_FORMAT', with options 'SHORT' and 'LONG' controlling how the
sprintf's are done ?

Will someone from pg-people do it or shall I do it for you ?
As I said previously, I have seen the GUC stuff and it seem's ok for me
to do it. I really do not know if there are any restrictions on who
implements what respecting PostgreSQL.
Tomorrow we have an holyday in Portugal and I shall leave for the whole
week-end, but I can do it on monday.

Best regards,
Pedro M. Ferreira

>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>

--
----------------------------------------------------------------------
Pedro Miguel Frazao Fernandes Ferreira
Universidade do Algarve
Faculdade de Ciencias e Tecnologia
Campus de Gambelas
8000-117 Faro
Portugal
Tel./Fax: (+351) 289 800950 / 289 819403
http://w3.ualg.pt/~pfrazao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-10-31 18:03:36 Re: 7.2.3 vacuum bug
Previous Message Tom Lane 2002-10-31 17:58:21 Re: float output precision questions