<?xml version="1.0" encoding="UTF-8" ?>
<feed xml:lang="ja" xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:thr="http://purl.org/syndication/thread/1.0">
  <title type="text">数学をわかりやすくするblog</title>
  <subtitle type="html"></subtitle>
  <link rel="self" type="application/atom+xml" href="https://wkrysksr.blog.shinobi.jp/atom"/>
  <link rel="alternate" type="text/html" href="https://wkrysksr.blog.shinobi.jp/"/>
  <updated>2013-12-12T22:09:02+09:00</updated>
  <author><name>YS</name></author>
  <generator uri="//www.ninja.co.jp/blog/" version="0.9">忍者ブログ</generator>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" />
  <entry>
    <id>wkrysksr.blog.shinobi.jp://entry/44</id>
    <link rel="alternate" type="text/html" href="https://wkrysksr.blog.shinobi.jp/Entry/44/" />
    <published>2016-07-25T20:00:00+09:00</published> 
    <updated>2016-07-25T20:00:00+09:00</updated> 
    <category term="数学" label="数学" />
    <title>直線の標準形(傾き)</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<br /><br /><a href="https://wkrysksr.blog.shinobi.jp/Entry/44/" target="_blank">つづきはこちら</a>]]> 
    </content>
    <author>
            <name>YS</name>
        </author>
  </entry>
  <entry>
    <id>wkrysksr.blog.shinobi.jp://entry/41</id>
    <link rel="alternate" type="text/html" href="https://wkrysksr.blog.shinobi.jp/Entry/41/" />
    <published>2016-03-01T19:00:00+09:00</published> 
    <updated>2016-03-01T19:00:00+09:00</updated> 
    <category term="数学" label="数学" />
    <title>長方形の面積と素数</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<div id="041box2" class="jxgbox" style="width: 300px; height: 300px;"></div>
<hr />
<div id="041box1" class="jxgbox" style="width: 100%; height: 300px;"></div>
<hr />
<div class="box">
<p><ruby>横<rt>よこ</rt></ruby>の長さ・<ruby>縦<rt>たて</rt></ruby>の長さをともに2以上の自然数に限定すると絶対に長方形の面積にならない自然数が存在する。</p>
<p>この長方形の面積にならない自然数は素数</p>
</div>
<script type="text/javascript">"use strict";!function(){for(var i=JXG.JSXGraph.initBoard("041box1",{boundingbox:[-1,21,51,-1],axis:!0,grid:!0,showNavigation:!1,showCopyright:!1,keepaspectratio:!0}),e=i.create("point",[0,0],{visible:!1}),o=i.create("point",[2,2],{snapToGrid:!0,withLabel:!1,infoboxDigits:0}),t=i.create("point",[0,function(){return o.Y()}],{visible:!1}),r=i.create("point",[function(){return o.X()},0],{visible:!1}),n=(i.create("polygon",[e,r,o,t],{fillColor:"skyblue",fillOpacity:.5,borders:{fixed:!0},hasInnerPoints:!0,vertices:{visible:!1,snapToGrid:!0},withLabel:!0,name:function(){return"面積: "+o.X()*o.Y()},label:{offset:[0,0],anchorX:"middle",anchorY:"middle"}}),[]),a=0;100>a;a++)n.push("white");for(var l=[],s=[],c=2;10>=c;c++)for(var f=c;100>=f&&!(c*f>100);f++)-1===s.indexOf(f*c)&&(n[f*c]="lightblue",s.push(f*c),l.push([f,c]));o.on("drag",function(){o.setPositionDirectly(JXG.COORDS_BY_USER,[Math.max(o.X(),2),Math.max(o.Y(),2)]),h.fullUpdate()});for(var h=JXG.JSXGraph.initBoard("041box2",{boundingbox:[-1,11,11,-1],showNavigation:!1,showCopyright:!1,keepaspectratio:!0}),b=function(i){for(var e=function(e){h.create("polygon",[[i,e],[i+1,e],[i+1,e+1],[i,e+1]],{fillColor:function(){return o.X()*o.Y()==10*e+i+1?"lightgreen":n[10*e+i+1]},fillOpacity:1,name:10*e+i+1,vertices:{visible:!1},borders:{visible:!1},withLabel:!0,label:{offset:[0,0],anchorX:"middle",anchorY:"middle"}})},t=0;10>t;t++)e(t)},p=0;10>p;p++)b(p)}();</script>]]> 
    </content>
    <author>
            <name>YS</name>
        </author>
  </entry>
  <entry>
    <id>wkrysksr.blog.shinobi.jp://entry/40</id>
    <link rel="alternate" type="text/html" href="https://wkrysksr.blog.shinobi.jp/Entry/40/" />
    <published>2016-02-18T20:00:00+09:00</published> 
    <updated>2016-02-18T20:00:00+09:00</updated> 
    <category term="数学" label="数学" />
    <title>エラトステネスの篩</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<div id="040box" class="jxgbox" style="width: 100%; height: 500px;"></div>
<div class="box">
<h2>操作説明</h2>
<ul>
<li>n : 数字表の最大値 (大きいと処理が重くなります)</li>
<li>初期化ボタン : 1 から n までの数字表を作る</li>
<li>横幅 : 数字表の横幅の調節</li>
<li>倍数 : この数より大きな倍数を削除する</li>
</ul>
</div>
<div class="box">
<h2>エラトステネスの<ruby>篩<rp>(</rp><rt>ふるい</rt><rp>)</rp></ruby></h2>
<p>エラトステネス (Eratosthenes) | 生年月日: -275 〜 -194 | 出身地: 古代ギリシャのキュレネ</p>
<ul>
<li>2 から n までの数字表を書く</li>
<li>2より大きな2の倍数を表から削除する</li>
<li>3より大きな3の倍数を表から削除する</li>
<li>4より大きな4の倍数を表から削除する</li>
<li>同じ操作を n の平方根まで続ける</li>
</ul>
</div>
<script type="text/javascript">"use strict";!function(){function e(){for(var e=0;e<i.length;e++)e+1>s&&(e+1)%s==0&&(u[e]=1),e+1>h.Value()&&(e+1)%h.Value()==0&&(u[e]=2);s=h.Value()}function r(){i.forEach(function(e){l.removeObject(e)}),i=[],u=[];for(var r=f.Value(),t=function(e){var r=l.create("text",[function(){return Math.floor(e%d.Value())*n+a},function(){return Math.floor(e/d.Value())*n+o},String(e+1)],{fixed:!0,anchorX:"right",strokeColor:function(){return c[u[e]]}});i.push(r),u.push(0)},g=0;r>g;g++)t(g);i[0].setAttribute({strokeColor:"lightgray"}),u[0]=1,s=h.Value(),e()}var t=50,n=2,a=5,o=2,i=[],u=[0],c=["black","lightgray","green"],s=0,l=JXG.JSXGraph.initBoard("040box",{boundingbox:[0,t,t,0],showNavigation:!1,showCopyright:!1,keepaspectratio:!0});l.create("button",[a,o,"初期化",r],{fixed:!0}),l.create("text",[a+7,o,function(){return"残り "+u.reduce(function(e,r){return 0==r?e+1:e},0)}]),o+=2;var f=l.create("slider",[[a,o],[t-a,o],[1,100,500]],{precision:0,snapWidth:1,name:"n"});o+=2;var h=l.create("slider",[[a,o],[t-a,o],[2,2,50]],{precision:0,snapWidth:1,name:"倍数"});h.on("drag",e),o+=2;var d=l.create("slider",[[a,o],[t-a,o],[1,1,50]],{precision:0,snapWidth:1,name:"横幅"});o+=2}();</script>]]> 
    </content>
    <author>
            <name>YS</name>
        </author>
  </entry>
  <entry>
    <id>wkrysksr.blog.shinobi.jp://entry/38</id>
    <link rel="alternate" type="text/html" href="https://wkrysksr.blog.shinobi.jp/Entry/38/" />
    <published>2016-02-11T20:00:00+09:00</published> 
    <updated>2016-02-11T20:00:00+09:00</updated> 
    <category term="目次" label="目次" />
    <title>数学の目次</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<table border="1" align="center" cellpadding="10">
<tbody>
<tr>
<td><a href="http://wkrysksr.blog.shinobi.jp/Entry/40" target="_blank">エラトステネスの<ruby>篩<rp>(</rp><rt>ふるい</rt><rp>)</rp></ruby></a></td>
<td>自然数 素数</td>
</tr>
<tr>
<td><a href="http://wkrysksr.blog.shinobi.jp/Entry/44" target="_blank">直線の標準形(傾き)</a></td>
<td>一次函数 グラフ</td>
</tr>
</tbody>
</table>]]> 
    </content>
    <author>
            <name>YS</name>
        </author>
  </entry>
  <entry>
    <id>wkrysksr.blog.shinobi.jp://entry/36</id>
    <link rel="alternate" type="text/html" href="https://wkrysksr.blog.shinobi.jp/Entry/36/" />
    <published>2015-07-14T01:03:23+09:00</published> 
    <updated>2015-07-14T01:03:23+09:00</updated> 
    <category term="数学" label="数学" />
    <title>平方根の近似値の求め方(分数)</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<div class="box">
<p>負の解もあるけど、めんどうなので正の解のみ考える</p>
<p>`x^2 = S`</p>
<p>両辺を `x!=0` で割ると</p>
<p>`x = S/x`</p>
<br />

<p>`x &lt; sqrt(S)` のとき `S/x &gt; x`</p>
<p>`x = sqrt(S)` のとき `S/x = x`</p>
<p>`x &gt; sqrt(S)` のとき `S/x &lt; x`</p>
<br />

<p>`x!=sqrt(S)` のとき `sqrt(S)` は `x`と`S/x`の間のどこかに存在する</p>
<br />

<h3>`sqrt(2)` の例</h3>
<p>`1.4 &lt; sqrt(2)` のとき `2/1.4 = 1.428cdots &gt; 1.4`</p>
<p>`1.414cdots = sqrt(2)` のとき `2/1.414cdots = 1.414cdots`</p>
<p>`1.5 &gt; sqrt(2)` のとき `2/1.5 = 1.333cdots &lt; 1.5`</p>
</div>
<div class="box">
<h3>中間分数(Mediant)</h3>
<p>`b/a &lt; (b+d)/(a+c) &lt; d/c`</p>
<br />

<h3>相加平均(算術平均)</h3>
<p>`b/a &lt; 1/2**(b/a + d/c) &lt; d/c`</p>
<p>`b/a &lt; (ad+bc)/(2ac) &lt; d/c`</p>
</div>
<div class="box">
<h3>`sqrt(9)` の近似値を求める (真値は 3 と -3)</h3>
<table>
<tbody>
<tr><th>`x`</th><th>`9/x`</th><th>`3-x`</th><th>`3-9/x`</th><th>`1/3*x`</th><th>`1/3*9/x`</th></tr>
<tr>
<td>1</td>
<td>9</td>
<td>2</td>
<td>-6</td>
<td>`1/3`</td>
<td>3</td>
</tr>
<tr>
<td>2</td>
<td>4.5</td>
<td>1</td>
<td>-1.5</td>
<td>`2/3`</td>
<td>`3/2`</td>
</tr>
<tr>
<td>3</td>
<td>3</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>4</td>
<td>2.25</td>
<td>-1</td>
<td>0.75</td>
<td>`4/3`</td>
<td>`3/4`</td>
</tr>
<tr>
<td>5</td>
<td>1.8</td>
<td>-2</td>
<td>1.2</td>
<td>`5/3`</td>
<td>`3/5`</td>
</tr>
</tbody>
</table>
<br />

<p>初期値を 2 とする</p>
<p>`2 &lt; sqrt(9) &lt; 9/2`</p>
<h3>中間分数(Mediant)</h3>
<p>`9/2 と 2/1` の中間分数</p>
<p>`(9+2)/(2+1) = 11/3`</p>
<p>`9*(3/11) = 27/11`</p>
<p>`27/11 &lt; sqrt(9) &lt; 11/3`</p>
<p>`81/33 &lt; 99/33 &lt; 121/33`</p>
<br />

<p>`81/33 と 121/33` の中間分数</p>
<p>`(81+121)/(33+33) = 101/33`</p>
<p>`9*(33/101) = 297/101`</p>
<p>`297/101 &lt; sqrt(9) &lt; 101/33`</p>
<p>`9801/3333 &lt; 9999/3333 &lt; 10201/3333`</p>
<br />

<p>`9801/3333 と 10201/3333` の中間分数</p>
<p>`(9801+10201)/(3333+3333) = 10001/3333`</p>
<p>`9*(3333/10001) = 29997/10001`</p>
<p>`29997/10001 &lt; sqrt(9) &lt; 10001/3333`</p>
<p>`99980001/33333333 &lt; 99999999/33333333 &lt; 100020001/33333333`</p>
<table>
<tbody>
<tr><th>`x`</th><th>`9/x`</th><th>`3-x`</th><th>`3-9/x`</th><th>`1/3*x`</th><th>`1/3*9/x`</th></tr>
<tr>
<td>`121/33`</td>
<td>`81/33`</td>
<td>-0.6666&hellip;</td>
<td>0.5454&hellip;</td>
<td>`121/99`</td>
<td>`81/99`</td>
</tr>
<tr>
<td>`10201/3333`</td>
<td>`9801/3333`</td>
<td>-0.060606&hellip;</td>
<td>0.059405&hellip;</td>
<td>`10201/9999`</td>
<td>`9801/9999`</td>
</tr>
<tr>
<td>`100020001/33333333`</td>
<td>`99980001/33333333`</td>
<td>-0.00060006&hellip;</td>
<td>0.00059994&hellip;</td>
<td>`100020001/99999999`</td>
<td>`99980001/99999999`</td>
</tr>
</tbody>
</table>
<h3>相加平均(算術平均)</h3>
<p>`9/2 と 2/1` の相加平均</p>
<p>`(2*2+9*1)/(2*2*1) = 13/4`</p>
<p>`9*(4/13) = 36/13`</p>
<p>`36/13 &lt; sqrt(9) &lt; 13/4`</p>
<br />

<p>`36/13 と 13/4` の相加平均</p>
<p>`(13*13+36*4)/(2*13*4) = 313/104`</p>
<p>`9*(104/313) = 936/313`</p>
<p>`936/313 &lt; sqrt(9) &lt; 313/104`</p>
<br />

<p>`936/313 と 313/104` の相加平均</p>
<p>`(313*313+936*104)/(2*313*104) = 195313/65104`</p>
<p>`9*(65104/195313) = 585936/195313`</p>
<p>`585936/195313 &lt; sqrt(9) &lt; 195313/65104`</p>
<table>
<tbody>
<tr><th>`x`</th><th>`9/x`</th><th>`3-x`</th><th>`3-9/x`</th><th>`1/3*x`</th><th>`1/3*9/x`</th></tr>
<tr>
<td>`13/4`</td>
<td>`36/13`</td>
<td>-0.25</td>
<td>0.23076&hellip;</td>
<td>`13/12`</td>
<td>`36/39`</td>
</tr>
<tr>
<td>`313/104`</td>
<td>`936/313`</td>
<td>-0.009615&hellip;</td>
<td>0.009584&hellip;</td>
<td>`313/312`</td>
<td>`936/939`</td>
</tr>
<tr>
<td>`195313/65104`</td>
<td>`585936/195313`</td>
<td>-0.000015360039</td>
<td>0.000015359960</td>
<td>`195313/195312`</td>
<td>`585936/585939`</td>
</tr>
</tbody>
</table>
</div>]]> 
    </content>
    <author>
            <name>YS</name>
        </author>
  </entry>
  <entry>
    <id>wkrysksr.blog.shinobi.jp://entry/35</id>
    <link rel="alternate" type="text/html" href="https://wkrysksr.blog.shinobi.jp/Entry/35/" />
    <published>2015-07-03T22:15:29+09:00</published> 
    <updated>2015-07-03T22:15:29+09:00</updated> 
    <category term="数学" label="数学" />
    <title>小数は分数の足し算(n進小数)</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<div class="box">
<p>小数は分数の足し算の分子を抜き出したもの</p>
<p>`0 &lt;= x_i &lt;= n-1`</p>
<p class="fraction">`sum_(i=0)^k x_i/(n^i) = x_0/n^0 + x_1/n^1 + cdots + x_k/n^k`</p>
<p>`(x_0;x_1,x_2,cdots,x_k)_n`</p>
</div>
<div class="box">
<p class="fraction"><strong>`1/2+1/8` をn進小数に変換する</strong></p>
<br />

<h3>2進小数</h3>
<p class="fraction">`1/2+1/8　=　1/(2^1)+1/(2^3)　=　 0/(2^0)+1/(2^1)+0/(2^2)+1/(2^3)　=　(0;1,0,1)_2`</p>
<br />

<h3>10進小数</h3>
<p class="fraction">`10/2 = 5`</p>
<p class="fraction">`1/2 = 5/(10^1)`</p>
<br />

<p class="fraction">`10/8 = 1 + 2/8　(2**10)/8 = 20/8 = 2 + 4/8　(4**10)/8 = 40/8 = 5`</p>
<p class="fraction">`1/8 = 1/(10^1)+2/(10^2)+5/(10^3)`</p>
<br />

<p class="fraction">`1/2+1/8 = 0/(10^0)+6/(10^1)+2/(10^2)+5/(10^3) = (0;6,2,5)_10`</p>
<br />

<h3>16進小数</h3>
<p class="fraction">`1/2+1/8　=　8/(16^1)+2/(16^1)　=　 0/(16^0)+10/(16^1)　=　(0;10)_16`</p>
<br />

<h3>60進小数</h3>
<p class="fraction">`60/2 = 30`</p>
<p class="fraction">`1/2 = 30/(60^1)`</p>
<br />

<p class="fraction">`60/8 = 7 + 4/8　(4**60)/8 = 240/8 = 30`</p>
<p class="fraction">`1/8 = 7/(60^1)+30/(60^2)`</p>
<br />

<p class="fraction">`1/2+1/8 = 0/(60^0)+37/(60^1)+30/(60^2) = (0;37,30)_60`</p>
</div>]]> 
    </content>
    <author>
            <name>YS</name>
        </author>
  </entry>
  <entry>
    <id>wkrysksr.blog.shinobi.jp://entry/34</id>
    <link rel="alternate" type="text/html" href="https://wkrysksr.blog.shinobi.jp/Entry/34/" />
    <published>2015-06-20T00:32:15+09:00</published> 
    <updated>2015-06-20T00:32:15+09:00</updated> 
    <category term="数学" label="数学" />
    <title>近似値で計算</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<div class="box">
<p>絶対誤差(誤差) = 近似値 - 真値</p>
<p>相対誤差(誤差率) = 絶対誤差 / 真値</p>
</div>
<div class="box">
<p>`1/2`の真値を 0.5 近似値を 0.6 とする</p>
<p>`1/2 = 0.5`</p>
<p>`1/2 ~~ 0.6`</p>
<br />

<p>`5/2` を真値で計算すると</p>
<p>`5/2 = 5**1/2 = 5**0.5 = 2.5`</p>
<p>`5/2 = 2+1/2 = 2+0.5 = 2.5`</p>
<p>`5/2 = 2+1/2 = 1/(1/2)+1/2 = 1/0.5+0.5 = 2.5`</p>
<br />

<p>`5/2` を近似値で計算すると</p>
<p>`5/2 = 5**1/2 ~~ 5**0.6 = 3.0`</p>
<p>`5/2 = 2+1/2 ~~ 2+0.6 = 2.6`</p>
<p>`5/2 = 2+1/2 = 1/(1/2)+1/2 ~~ 1/0.6+0.6 = 1.666cdots+0.6 = 2.2666cdots`</p>
</div>
<table>
<tbody>
<tr><th>近似値</th><th>絶対誤差</th><th>相対誤差</th></tr>
<tr>
<td>0.6</td>
<td>`0.6-0.5 = 0.1`</td>
<td>`0.1/0.5 = 0.2`</td>
</tr>
<tr>
<td>3.0</td>
<td>`3.0-2.5 = 0.5`</td>
<td>`0.5/2.5 = 0.2`</td>
</tr>
<tr>
<td>2.6</td>
<td>`2.6-2.5 = 0.1`</td>
<td>`0.1/2.5 = 0.04`</td>
</tr>
<tr>
<td>`2.2666cdots`</td>
<td>`2.2666cdots-2.5 = -0.2333cdots`</td>
<td>`(-0.2333cdots)/2.5 = -0.09333cdots`</td>
</tr>
</tbody>
</table>]]> 
    </content>
    <author>
            <name>YS</name>
        </author>
  </entry>
  <entry>
    <id>wkrysksr.blog.shinobi.jp://entry/33</id>
    <link rel="alternate" type="text/html" href="https://wkrysksr.blog.shinobi.jp/Entry/33/" />
    <published>2015-05-27T19:48:10+09:00</published> 
    <updated>2015-05-27T19:48:10+09:00</updated> 
    <category term="数学" label="数学" />
    <title>等号の使い方のつまずきやすいところ</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<p>正しいのか間違いなのか、わからなくなる等号の使い方を並べてみました</p>
<div class="box">
<p>`1/2 != 2/4 != 5/10 = 0.5`</p>
</div>
<div class="box">
<p>掛け算と割り算は逆演算の関係だから</p>
<p>`21 = 7 ** 3`</p>
<p>`21 -: 7 = 3`</p>
<br />

<p>`0 = 0 ** 2`</p>
<p>`0 -: 0 = 2`</p>
<br />

<p>`0 = 0 ** 3`</p>
<p>`0 -: 0 = 3`</p>
<br />

<p>`2 = 0 -: 0 = 3`</p>
<p>`2 = 3`</p>
</div>
<div class="box">
<p>分数は分母の個数集まると分子の数になる数とすると</p>
<p>`2/5 + 2/5 + 2/5 + 2/5 + 2/5 = 2`</p>
<p>`1/oo + 1/oo + 1/oo + cdots = 1`</p>
<p>`0 + 0 + 0 + cdots = 0`</p>
<p>`1/oo != 0`</p>
</div>
<div class="box">
<p>`8/9 + 1/9 = (0.888cdots) + (0.111cdots) = (0.999cdots)`</p>
<p>`10/9 - 1/9 = (1.111cdots) - (0.111cdots) = (1.000cdots)`</p>
<p>`(0.999cdots) = 9/9 = (1.000cdots)`</p>
<p>`(0.999cdots) = (1.000cdots)`</p>
</div>
<div class="box">
<p>`x^2 + y^2 = 9`</p>
<p>`x = 0`のとき</p>
<p>`y^2 = 9`</p>
<p>`y^2 = y**y = 3**3 = (-3)**(-3) = 9`</p>
<p>`y = 3 = -3`</p>
<p>`3 = -3`</p>
</div>
<div class="box">
<p>`3**3 = (-3)**(-3) = sqrt(9)**sqrt(9) != sqrt(-9)**sqrt(-9)`</p>
<p>`3 != -3`</p>
<p>`sqrt(9) = 3`</p>
<p>`sqrt(9) = -3`</p>
<p>`sqrt(-9) != 3`</p>
<p>`sqrt(-9) != -3`</p>
<p>`sqrt(9) != sqrt(-9)`</p>
</div>]]> 
    </content>
    <author>
            <name>YS</name>
        </author>
  </entry>
  <entry>
    <id>wkrysksr.blog.shinobi.jp://entry/32</id>
    <link rel="alternate" type="text/html" href="https://wkrysksr.blog.shinobi.jp/Entry/32/" />
    <published>2015-05-27T00:10:45+09:00</published> 
    <updated>2015-05-27T00:10:45+09:00</updated> 
    <category term="数学" label="数学" />
    <title>巨大数と無限大と極限</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<div class="box">
<h3>無限大</h3>
<ul>
<li>無限大とは、思いつく最も大きい巨大数に1足した数よりも、さらに大きい数のこと</li>
<li>実数は無限に存在する</li>
<li>実数 x の値が確定した瞬間、無限大よりとても小さいことが確定する</li>
<li>`x = x+1` を満たす実数 x は存在しないけど `oo = oo + 1` なら成立しそう</li>
</ul>
<br />

<p>大きさを比較すると、こんな感じになる</p>
<p>`10^(10^(10^(10^10))) &lt; 10^(10^(10^(10^10))) + 1 " &lt;&lt;&lt;&lt;&lt; " oo`</p>
</div>
<div class="box">
<h3>極限 `x rarr oo`</h3>
<ul>
<li>実数 x が無限大に近づくってなんだろう？</li>
<li>グラハム数みたいな巨大数ですら無限大に近づけないことから考えると 無限大に近づける実数 x は存在しないはず</li>
<li class="fraction">感覚的に `1/(10^(10^(10^(10^10)))) ~~ 0` はいいけど `10^(10^(10^(10^10))) ~~ oo` は無理があるように感じる</li>
<li>極限の代わりに &epsilon;-&delta;論法 を使うか、超実数の勉強すれば理解できる&hellip;のか？</li>
</ul>
</div>]]> 
    </content>
    <author>
            <name>YS</name>
        </author>
  </entry>
  <entry>
    <id>wkrysksr.blog.shinobi.jp://entry/31</id>
    <link rel="alternate" type="text/html" href="https://wkrysksr.blog.shinobi.jp/Entry/31/" />
    <published>2015-05-11T21:11:11+09:00</published> 
    <updated>2015-05-11T21:11:11+09:00</updated> 
    <category term="Linux" label="Linux" />
    <title>gstreamerとopen_jtalkで字幕の読み上げ</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<p>tts_server.py</p>
<pre class="code_container box">#! /usr/bin/env python3
import socketserver
import subprocess

SPEED = 1.8
PITCH = 300
VOLUME = 1.0
DICDIR = "/var/lib/mecab/dic/open-jtalk/naist-jdic/"
HTSVOICE = "/opt/voice/mei_normal.htsvoice"
CMD = "open_jtalk -r {0} -p {1} -jm {2} -x {3} -m {4} -ow /dev/stdout \
| aplay --quiet".format(SPEED, PITCH, VOLUME, DICDIR, HTSVOICE)

class TTS_Server(socketserver.BaseRequestHandler):
    """
        gstreamerのudpsink(5004)から文字列を受け取って
        open_jtalkのstdinに渡すUDPServer
    """

    def handle(self):
        data = self.request[0]
        with subprocess.Popen(CMD, shell=True,
                                stdin=subprocess.PIPE).stdin as stream:
            stream.write(data)
        print(str(data,"utf8"))

if __name__ == "__main__":
    HOST, PORT = "localhost", 5004
    print("server listen {0}:{1}".format(HOST, PORT))
    server = socketserver.UDPServer((HOST, PORT), TTS_Server)
    server.serve_forever()

# 2015/05/11 とりあえず動いた
</pre>
<p>gst-srt-tts.sh</p>
<pre class="code_container box">#!/bin/sh
WIDTH=960
VIDEO_HEIGHT=540
SUBTITLE_HEIGHT=100
FONT_NAME="selif"
VIDEO_PATH="$1"
SRT_PATH="${1%.*}.srt"

gst-launch-1.0 videomixer name=mix sink_1::ypos=${VIDEO_HEIGHT} ! xvimagesink \
filesrc location="${VIDEO_PATH}" ! queue ! decodebin name=decode \
decode. ! videoscale ! video/x-raw,width=${WIDTH},height=${VIDEO_HEIGHT} ! mix.sink_0 \
decode. ! pulsesink \
videotestsrc pattern=black ! video/x-raw,width=${WIDTH},height=${SUBTITLE_HEIGHT} \
! subtitleoverlay name=overlay font-desc="${FONT_NAME}" ! mix.sink_1 \
filesrc location="${SRT_PATH}" ! queue \
! subparse subtitle-encoding=UTF-8 ! tee name=srt ! overlay. \
srt. ! udpsink
</pre>
<div class="box">
<h3>使い方</h3>
<p>tts_serverを起動しておく</p>
<pre class="sh_container box">python3 tts_server.py
</pre>
<p>別の terminal を開いて test.mp4 test.srt がある場所で</p>
<pre class="sh_container box">gst-srt-tts.sh test.mp4
</pre>
<p>で日本語字幕の表示と読み上げをしながら動画再生する</p>
<h3>参考にしたところ</h3>
<ul>
<li><a href="http://docs.python.jp/3/library/socketserver.html" target="_blank"> http://docs.python.jp/3/library/socketserver.html </a></li>
<li><a href="http://docs.python.jp/3/library/subprocess.html" target="_blank"> http://docs.python.jp/3/library/subprocess.html </a></li>
</ul>
</div>]]> 
    </content>
    <author>
            <name>YS</name>
        </author>
  </entry>
</feed>