I am trying to save a float number which is this long
13.00386644742523
Its basically Lat and Lng value.
when i save it in the database its getting stored as
13.0039
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Based on experience I did this for a navigation database built from ARINC424 and eventually used a DECIMAL(18,12) for storing values in radians.
NOTE: Floats and doubles aren’t as precise and may result in rounding errors
The point is that when using degrees or radians we know the range of the values – and the fractional part needs the most digits.
The best way is to use MySQL Spatial Extensions