Can I represent the following co-ordinate triplets using variable type "double"?
512685.93 5403444.22 305.63,
512685.91 5403445.72 305.55,
512685.90 5403447.12 305.54, ...
Those values correspond to x, y & z in my input file. After doing some process by my program, I got the output file with following values as:
512668 5.40345e+006 321.39,
512667 5.40345e+006 321.57,
512666 5.40345e+006 321.89,
512666 5.40344e+006 321.32,
512665 5.40344e+006 321.64, ...
I have used double x, y, z
to represent those values. Why aren't they printed with a format more similar to the first example?
Look at how you print the values, likely the values are still fine but your output mechanism limits precision.