static const double sKPrecision = 1.e+16;
std::sprintf(str, "%1.15e", round(val * sKPrecision) / sKPrecision);
Observation:
val str for Linux str for QNX
-0.174533 -1.745329251994333e-01 -1.745329251994333e-01
1.06202 1.062015382745040e+00 1.062015382745040e+00
1.63244 1.632439935370810e+00 1.632439935370811e+00
As per the above table, for 1.63244 the "str" is different for QNX than Linux. I want this value to be same as that of Linux. I am not sure how to solve it for QNX platform.