Thank you for the reply.
After 3 hours trials and reading the source code of Postgres backend, now I
can figure out a way to transfer float data from sever to client and then
write back to server *without lose any precision*.
At server part, it uses strtod to convert received string to float valu
In response to Vincenzo Romano :
> 2010/1/29 ?? :
> > Hi!
> >
> > In C Language, there is a way to format float numbers into a hex string by
> > using "%a" in printf.
> > eg:
> > the value: 1.2345 can be expressed as '0x1.3c083126e978dp+0' which is the
> > hex representation of a float number.
2010/1/29 沈雷 :
> Hi!
>
> In C Language, there is a way to format float numbers into a hex string by
> using "%a" in printf.
> eg:
> the value: 1.2345 can be expressed as '0x1.3c083126e978dp+0' which is the
> hex representation of a float number.
>
> I have tried this in Postgres:
> SELECT '0x1.3c08
Hi!
In C Language, there is a way to format float numbers into a hex string by
using "%a" in printf.
eg:
the value: 1.2345 can be expressed as '0x1.3c083126e978dp+0' which is the
hex representation of a float number.
I have tried this in Postgres:
SELECT '0x1.3c083126e978dp+0'::float;
float8
---