I am studying Qt, I find it really amazing and a bit easier because I've already used MFC in Microsoft.
I've developed a scientific calculator for educational use. But what faced me is:
I want float high precision like in real-world calculators so after searching I've found this function:
long double ldRes = std::sqrt(3);
QMessageBox m;
m.settext(QString::number(ldRes, 'g', 30));
m.exec();
The output:
1.73205080756887719317660412344
While the output, according the The Casio Calculator, of the same operation to the same precision, should be:
1.73205080756887729352744634151
So it is apparent that the result is not the same so can anyone advise me how to get correct float-precision in my applications using Qt? or any other library?
Should I use GMP MPIR MPFR?
Thank you!