Produce a table of the values of the series

for the 2001 values of x, x= 0.000, 0.001, 0.002, ..., 2.000. All entries of the table must have an absolute error less than 0.5e-12 (12 digits of precision). This problem is based on a problem from Hamming (1962), when mainframes were very slow by today's microcomputer standards.
Input
This problem has no input.
Output
The output is to be formatted as two columns with the values of x and y(x) printed as in the C printf or the Pascal writeln.
printf("%5.3f %16.12f/n", x, psix ) writeln(x:5:3, psix:16:12)
As an example, here are 4 acceptable lines out of 20

该博客探讨了如何高效地计算一个级数的数值和,以满足高精度要求。通过公式转换加快收敛速度,避免了由于计算过多项导致的时间消耗和浮点运算的舍入误差。使用Pascal语言展示了计算示例,并提供了C语言风格的输出格式。
最低0.47元/天 解锁文章
3208

被折叠的 条评论
为什么被折叠?



