正在加载图片...
§5 Cubic spline Output(a represents a space) For each test case, you are supposed to output the following information: 1. The set of coefficients of s(x)in the format b1 d b, c2 d, where S(x)=S(x)=a; +b; (x-x-1)+c, (x-xi-)+d(x-x -1) -1 b. c d Each coefficient is to be printed as in C printf: fprintf(outfile, %128e", coefficient ) 2. m+l approximating values of f at to, . ,tm in the format: fprintf(outfile, " f(%12 8e)0=0%12.8en",t, S); The outputs of two test cases must be seperated by a blank line. Sample Input 2 0.0■1.0■2.0 0.0■1.0■2.0 1■1.0■1.0■0.0 0.0■3.0■2 0.5■-0.25■0.0 0.0247500■0.3349375■11010000 2■0.0■0.0■0.0 1.0■0.0■4§5 Cubic Spline Output ( represents a space) For each test case, you are supposed to output the following information: 1. The set of coefficients of S(x) in the format: where for . Each coefficient is to be printed as in C printf: fprintf(outfile, "%12.8e" , coefficient ); 2. m+1 approximating values of f at in the format: fprintf(outfile, "f(%12.8e)=%12.8e\n" , t, S ); The outputs of two test cases must be seperated by a blank line. n n n dn a b c a b c d a b c d . . . . . . . . . . . .2 2 2 2 1 1 1 1 3 1 2 1 1 [ ] ( ) ( ) ( ) ( ) ( )   j  j  j  j  j  j  j j S x S x a b x x c x x d x x [ , ] x  x j1 x j m t , ..., t 0 Sample Input 2 0.01.02.0 0.01.02.0 11.01.00.0 0.03.02 2 –0.5–0.250.0 –0.02475000.33493751.1010000 20.00.00.0 –1.00.04 –1
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有