1

This is my SQL:

    SELECT st_asText(ST_GeomFromText('POINT(52.000000000012345678 21.0000000000123456789)'))
    SELECT st_asText(ST_MakePoint(52.000000000012345678, 21.0000000000123456789))

But response is:

    POINT(52.0000000000123 21.0000000000123)

I need double double precision in PostGis. How can i fix it?

2
  • 3
    You need double double precision ! What are you doing, positioning quarks ? Commented Mar 14, 2014 at 11:15
  • 2
    Quoting this: "Thirteen decimal places will pin down the location to 111,111/10^13 = about 1 angstrom, around half the thickness of a small atom." Commented Mar 14, 2014 at 13:25

1 Answer 1

3

That is already double precision. Single precision coordinates would trim after the sixth decimal whereas double offers 15 digits of precision. You're trying to set a point with 18 decimal positions.

Also is important to note that the number of decimal places a double can hold depends on the numbers to the left of the decimal separator. (see OSGeo rants abot that) so you're using two digits for the integer part (52 and 21) and you have 13 digits left to play with, which is exactly what you're getting in the response.

Sign up to request clarification or add additional context in comments.

1 Comment

Well, the OP asked for "double double", meaning quadruple precision floats (128 bit floats in IEEE 754) or something along those lines.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.