I would not worry about precision too much for your application. If you are expressing latitude and longitude with C++ data type
double on a normal Intel machine you will have at least 15 decimal digits of precision. An arc second represented as radian is 5 * 10**-6. So you have a precision of about 10**-9 arc seconds, each of which corresponds to 30m on the surface. So your results are precise to about 10**-7 meters, which is a tenth of a micrometer. That sounds like enough for most applications.
Another question is how to avoid all those 9s in results. 89.999999999 degrees latitude simply looks ugly. The secret to success here is rounding. When using printf, it will do the rounding for you if you specify a certain number of decimals, for example:
printf ("%.6f", 89.9999999999999);
will yield
90.000000
Now, if you convert your latitudes and longitudes to more human readable formats, like N53 34'47" then pay attention to implement the correct rounding mechanisms.