差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
lecture:kiso2:ex:ex06-9.c [2019/10/30 19:27]
sano
lecture:kiso2:ex:ex06-9.c [2019/10/30 19:30] (現在)
sano
ライン 10: ライン 10:
 t190900@s01cd0542-160:​~/​kiso2-2019/​ex06$ ./ex06-9 t190900@s01cd0542-160:​~/​kiso2-2019/​ex06$ ./ex06-9
 0 0
-k=0, talor=1.000000,​ diff=0.000000+k= 0, talor=1.000000000,​ diff=0.000000000
 t190900@s01cd0542-160:​~/​kiso2-2019/​ex06$ ./ex06-9 t190900@s01cd0542-160:​~/​kiso2-2019/​ex06$ ./ex06-9
 0.1 0.1
-k=0, talor=1.000000,​ diff=0.111111 +k= 0, talor=1.000000000,​ diff=0.111111111 
-k=1, talor=1.100000, diff=0.011111 +k= 1, talor=1.100000000, diff=0.011111111 
-k=2, talor=1.110000, diff=0.001111 +k= 2, talor=1.110000000, diff=0.001111111 
-k=3, talor=1.111000, diff=0.000111 +k= 3, talor=1.111000000, diff=0.000111111 
-k=4, talor=1.111100, diff=0.000011 +k= 4, talor=1.111100000, diff=0.000011111 
-k=5, talor=1.111110, diff=0.000001 +k= 5, talor=1.111110000, diff=0.000001111 
-k=6, talor=1.111111, diff=0.000000+k= 6, talor=1.111111000, diff=0.000000111
 t190900@s01cd0542-160:​~/​kiso2-2019/​ex06$ ./ex06-9 t190900@s01cd0542-160:​~/​kiso2-2019/​ex06$ ./ex06-9
 0.5 0.5
-k=0, talor=1.000000,​ diff=1.000000 +k= 0, talor=1.000000000,​ diff=1.000000000 
-k=1, talor=1.500000, diff=0.500000 +k= 1, talor=1.500000000, diff=0.500000000 
-k=2, talor=1.750000, diff=0.250000 +k= 2, talor=1.750000000, diff=0.250000000 
-k=3, talor=1.875000, diff=0.125000 +k= 3, talor=1.875000000, diff=0.125000000 
-k=4, talor=1.937500, diff=0.062500 +k= 4, talor=1.937500000, diff=0.062500000 
-k=5, talor=1.968750, diff=0.031250 +k= 5, talor=1.968750000, diff=0.031250000 
-k=6, talor=1.984375, diff=0.015625 +k= 6, talor=1.984375000, diff=0.015625000 
-k=7, talor=1.992188, diff=0.007812 +k= 7, talor=1.992187500, diff=0.007812500 
-k=8, talor=1.996094, diff=0.003906 +k= 8, talor=1.996093750, diff=0.003906250 
-k=9, talor=1.998047, diff=0.001953 +k= 9, talor=1.998046875, diff=0.001953125 
-k=10, talor=1.999023, diff=0.000977 +k=10, talor=1.999023438, diff=0.000976562 
-k=11, talor=1.999512, diff=0.000488 +k=11, talor=1.999511719, diff=0.000488281 
-k=12, talor=1.999756, diff=0.000244 +k=12, talor=1.999755859, diff=0.000244141 
-k=13, talor=1.999878, diff=0.000122 +k=13, talor=1.999877930, diff=0.000122070 
-k=14, talor=1.999939, diff=0.000061 +k=14, talor=1.999938965, diff=0.000061035 
-k=15, talor=1.999969, diff=0.000031 +k=15, talor=1.999969482, diff=0.000030518 
-k=16, talor=1.999985, diff=0.000015 +k=16, talor=1.999984741, diff=0.000015259 
-k=17, talor=1.999992, diff=0.000008 +k=17, talor=1.999992371, diff=0.000007629 
-k=18, talor=1.999996, diff=0.000004 +k=18, talor=1.999996185, diff=0.000003815 
-k=19, talor=1.999998, diff=0.000002 +k=19, talor=1.999998093, diff=0.000001907 
-k=20, talor=1.999999, diff=0.000001+k=20, talor=1.999999046, diff=0.000000954
 t190900@s01cd0542-160:​~/​kiso2-2019/​ex06$ ./ex06-9 t190900@s01cd0542-160:​~/​kiso2-2019/​ex06$ ./ex06-9
--0.1 +-0.2 
-k=0, talor=1.000000, diff=0.090909 +k= 0, talor=1.000000000, diff=0.166666667 
-k=1, talor=0.900000, diff=0.009091 +k= 1, talor=0.800000000, diff=0.033333333 
-k=2, talor=0.910000, diff=0.000909 +k= 2, talor=0.840000000, diff=0.006666667 
-k=3, talor=0.909000, diff=0.000091 +k= 3, talor=0.832000000, diff=0.001333333 
-k=4, talor=0.909100, diff=0.000009 +k= 4, talor=0.833600000, diff=0.000266667 
-k=5, talor=0.909090, diff=0.000001+k= 5, talor=0.833280000, diff=0.000053333 
 +k= 6, talor=0.833344000,​ diff=0.000010667 
 +k= 7, talor=0.833331200,​ diff=0.000002133 
 +k= 8, talor=0.833333760, diff=0.000000427
 </​code>​ </​code>​
 <note hint>​C言語では $b\times10^n$ で表される実数値**「定数」**を "//​b//​e//​n//"​ の形で表記することができます。 <note hint>​C言語では $b\times10^n$ で表される実数値**「定数」**を "//​b//​e//​n//"​ の形で表記することができます。
  • lecture/kiso2/ex/ex06-9.c.txt
  • 最終更新: 2019/10/30 19:30
  • by sano