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

Re: float output precision questions

From: Pedro Miguel Frazao Fernandes Ferreira <pfrazao(at)ualg(dot)pt>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: float output precision questions
Date: 2002-10-30 10:22:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Peter Eisentraut wrote:
>>Matlab has a toolbox fucntion, claiming maximum precision, to convert
>>from its double type (PostgreSQL float8) to string which does a
> Do we have some mathematical guarantee that this is sufficient and
> necessary?  If so, then it might do.

It is necessary if you want to do this type of (huge amount of number 
storage) application:

  [Some client] (insert)  [PostgreSQL]  (query)  [Some client]
(double number a)-------->(float8 number)------->(double number b)

In order for a=b this is necessary. With current float8 output this is 
not allways true.

Here is the help for that particular Matlab function:

  NUM2MSTR Convert number to string in maximum precision.
     S = NUM2MSTR(N) converts real numbers of input
     matrix N to string output vector S, in
     maximum precision.

     See also NUM2STR.

If you want I can try to contact the guys who coded this function to know
if this is sufficient.

Pedro M. Ferreira
Pedro Miguel Frazao Fernandes Ferreira
Universidade do Algarve
Faculdade de Ciencias e Tecnologia
Campus de Gambelas
8000-117 Faro
Tel./Fax:  (+351) 289 800950 / 289 819403

In response to

pgsql-hackers by date

Next:From: Pedro Miguel Frazao Fernandes FerreiraDate: 2002-10-30 10:28:42
Subject: Re: float output precision questions
Previous:From: Adam WitneyDate: 2002-10-30 09:25:51
Subject: Re: 7.3b3 on MacOSX 10.2.1

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