Thiele's interpolation formula: Difference between revisions

Content added Content deleted
(→‎{{header|C++}}: new entry)
(→‎{{header|C++}}: output improved)
Line 355: Line 355:
r_sin[i] = r_cos[i] = r_tan[i] = NAN;
r_sin[i] = r_cos[i] = r_tan[i] = NAN;


std::cout << std::setw(16) << std::setprecision(25) << 6 * i_sin(.5) << std::endl;
std::cout << std::setw(16) << std::setprecision(25)
std::cout << std::setw(16) << std::setprecision(25) << 3 * i_cos(.5) << std::endl;
<< 6 * i_sin(.5) << std::endl
std::cout << std::setw(16) << std::setprecision(25) << 4 * i_tan(1.) << std::endl;
<< 3 * i_cos(.5) << std::endl
<< 4 * i_tan(1.) << std::endl;


return 0;
return 0;