Peter Eisentraut wrote:
>
>>Matlab has a toolbox fucntion, claiming maximum precision, to convert
>>from its double type (PostgreSQL float8) to string which does a
>>sprintf('%25.18g',number).
>
>
> 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
tostring 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.
Thanks,
Pedro M. Ferreira
--
----------------------------------------------------------------------
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