> printing out the values to make sure they are correct they now look like this ...
the initial default precision for a stream is 6. to print out more decimal digits, do something like
std::cout << std::fixed << std::setprecision(8)
// 8 digits *after* decimal point
<< value ;
> I need absolute precision.
you will not get absolute precision with floating point values.
if the precision of a long double is not sufficient, you would either use integral types (numerator,denominator) or use a high precision arithmetic library.
vijayan121
Posting Virtuoso
1,606 posts since Dec 2006
Reputation Points: 1,159
Solved Threads: 287