Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Thank you both for your comments. I have edited the question above to give a specific example. Quad precision does seem to give an acceptable result, but double precision is disappointing.