2017年1月25日水曜日

電卓はいかに計算しているのか

電卓はいかに計算しているのか

カシオ計算機の電卓。右は同社の10億台目の製品〔AFPBB News〕
 

電卓の√キーの思い出

私が電卓に夢中になり始めたのが10歳から11歳です。きっかけは√キーです。√の意味を知らない小学5年生の私は、ふと思いつきました。√に続けて1、2、3、4、5、…と順に数値を代入してみようと。
√⇒1=1、√⇒2=1.4142135、√⇒3=1.7320508、√⇒4=2、√⇒5=2.2360679、√⇒6=2.4494897、√⇒7=2.6457513、√⇒8=2.8284271、√⇒9=3、√⇒10=3.1622776
8桁の液晶画面には数字が並びます。そのパターンから始めに気づいたのはリズムです。2、3、5、6、7、8、10に対して√の値は8桁の数字が返ってきますが、1、4、9に対するそれは1桁の整数値です。
「はてな?」と思いながら、11、12、13、14、15、16と続きを試してみました。11から15に対する√の値は8桁の数字です。√⇒16=4が表示された時に「おっ!」と思いました。
たった16個のパターンからルールが浮かんできたからです。1、4、9、16に対する√の値がそれぞれ1、2、3、4です。1、2、3、4のリズムに自然数というルールかも?と気づいたわけです。
自然数というルールは次が、□⇒√=5となることを推測させてくれます。ここで、1、4、9、16と1、2、3、4の関係を考えたことは言うまでもありません。1、2、3、4の2乗がそれぞれ1、4、9、16です。ならば、5の2乗の25が□の数ではないだろうか。
さらに続けます。17、18、19、20、21、22、23、24に対する√の値は8桁の数字です。そして、25⇒√=5となった瞬間、ルールは確信に近づいていきます。36⇒√=6、49⇒√=7、64⇒√=8、81⇒√=9、100⇒√=10、「やっぱり」。
 そして、√⇒2=1.4142135が1.4142135を2乗したのが2ということをつかみました。さらに、
1.4142135×1.4142135=1.9999998
 という電卓の結果は1.4142135は√2の本当の値ではなく近似値であることを示しています。だから、□×□=2となる√2は割り切れない数なのではないか、とも思いました。
 実際には高々10分のことでした。電卓は与えられた計算問題を解くための道具ですが、短い時間の間に計算の謎解き問題を与えてくれる楽しいおもちゃに変身したのです。おもちゃとしての電卓は、私にパターンからルールを見つける面白さを気づかせてくれました。
最後の推測は、√2が非循環無限小数すなわち無理数ではないのかということです。自然数から始まる数の発見物語の1つの終着点が「実数とは何か」という問題です。
大学生になって高木貞治の『解析概論』を本格的に読んだ時、私は実数概念の難しさを実感しました。小学5年生の時に電卓が与えてくれた感覚が、実は実数概念の初体験だったことを同時に気づきました。
 

√キーの不思議

さらに電卓遊びは続きます。√の計算の興味ある挙動をつかんだのもその時です。
1以上の数に対して、√キーをたたき続けると終いには1になることが知られています。
2⇒1.4142136⇒1.1892071⇒…⇒1.0006771⇒…⇒1.0000002⇒1.0000001⇒1 最後は1!
3⇒1.7320508⇒1.316074⇒…⇒1.0005366⇒…⇒1.0000005⇒1.0000003⇒1.0000001⇒1 最後は1!
1234⇒35.1283361⇒…⇒1.0004345⇒…⇒1.0000004⇒1.0000002⇒1.0000001⇒1 最後は1!
 このパターンを観察しているうちに私はさらに次の現象をとらえました。それは1に収束する終盤のステップです。
 小数点以下部分が√キーを叩く度に半分になることです。計算ステップを注意深くながめてみると、はじめのうちは小数点以下はぴたり半分にならずステップが進むに連れ、次第に2分の1になっていきます。
…⇒1.0000004⇒1.0000002⇒1.0000001⇒1
√の謎 小数点以下の部分が0.0000004⇒0.0000002⇒0.0000001と2分の1になるsin31°の驚異
 
関数電卓を手にしたことで電卓遊びはさらにヒートアップしました。それが三角関数の計算です。角度モードをdegにして、30⇒sinとすると0.5が返ってきます。三角定規の直角三角形(30°、60°、90°)において、斜辺の長さ2、高さが1なので、三角比の値がsin30°=1/2=0.5であることを意味していると理解できました。
 「ならば、sin31°は?」
31⇒sin とキーを叩くと、0.515038074。これは、31°、59°、90°の直角三角形の斜辺と高さの比が0.5150・・・であることを意味しています。しかし、関数電卓は斜辺と高さをいったいどうやって知ることができるのだろう?
sinの計算に遭遇したことで私の頭の中に疑問が生まれました。関数電卓の計算アルゴリズムです。√の計算の時には思いもしなかったことです。
sin31°=【関数電卓の計算アルゴリズム】=0.515038074
たし算とかけ算を根源的な演算とする電子計算機が、すべての計算をたし算とかけ算に帰着させていることになります。関数電卓の計算アルゴリズムに関心を持った理由がそこにあります。いったいどのようにsinがたし算とかけ算で計算されているのだろうか、その疑問を引っ提げて私は小学校を卒業します。
 

高校2年生 正規分布表の謎

ついに電卓の謎が解かれる時が訪れました。きっかけはやはり数値計算の謎でした。高校2年生の私は、偏差値算出の基本となる正規分布、その数表である正規分布表の算出方法を追いかけていました(下の表)。
(*配信先のサイトでこの記事をお読みの方はこちらで本記事の図表をご覧いただけます。http://jbpress.ismedia.jp/articles/-/48892)
私の目の前にある4桁の数字でびっしりと埋め尽くされた正規分布表。眺めていると、私にはまたあの疑問が浮かんできました。
 「いったいどうやって正規分布表の数値は計算されたのだろう?」
正規分布曲線は平均μと標準偏差σをパラメーターに持つ関数で表されます。その曲線によって囲まれた部分の面積が確率を表します。そこでこの曲線を表す関数を確率密度関数と呼ばれます。
平均が0、標準偏差が1である標準正規分布曲線が囲む面積(確率)は1です。確率統計の本にはこの正規分布表が載っています。
その数値(確率)は正規分布曲線で囲まれる面積を表すわけですが、その計算は正規分布の確率密度関数を積分することにより得られます。
例えば、正規分布表におけるu=1.00に対するp(1)は次のような定積分で与えられます。
したがって、この数値計算の鍵を握るのは次の積分です。
ところがこれが一筋縄ではいかない積分だったのです。
高校2年生の私は数学の先生、優秀な先輩、図書館の本にあたってみましたが納得できる答は得られませんでした。
 

マクローリン級数との出会い

ついに、ヒントになるテキストを見つけ出しました。翻訳された微分積分学の本の中に書かれた数式に目から鱗が落ちました。関数をマクローリン展開したマクローリン級数です。
√、指数関数、対数関数、そして三角関数、すべて一刀両断に同じような多項式の形に表されている風景に唖然としました。
はたして私の3つの謎がことごとく解き明かされていく計算過程に衝撃的な感動を覚えました。
 

小数点以下の部分が2分の1になる√の謎解き

上記マクローリン級数公式の1番目の式を用いることで説明がつきます。次は2に対して繰り返し√をとっていく計算過程です。整数部分が1、小数部分がxとしてマクローリン級数の数値と電卓の計算結果を比較してみると良い精度で合っていることが確認できます。
1より大きなどんな数に対しても√を繰り返しとっていけばその値は小さくなり、どこかの段階で整数部分が1になるので、これと同じ説明がつくことになります。
マクローリン級数の右辺第2項、xの係数が1/2です。これが小数点以下の部分が1/2になる理由です。そして、xが0に近いほど近似の精度は大きくなります。
 

sin31°の謎解き

マクローリン級数公式の4番目の式を用いることで説明がつきます。準備として、角度を「°」から「rad(ラジアン)」に変換する計算をします。
31°=π/180× 31rad≒0.541052rad
この数値をマクローリン級数のxに代入したのが次の計算です。
Sin31°は0.515039と算出されます。電卓の表示「0.515038074」と小数点以下5桁まで合っています。
正規分布表の謎解き
 
マクローリン級数公式の2番目の式を用いたp(1)の計算が次です。
算出された数値0.34134は、正規分布表u=1.00に対するp(u)の数値は0.3413と見事に4桁一致しています。
微分積分学=calculus
 
こうして私が小学校から高校まで抱いた3つの数値計算の謎は、マクローリン級数によって解き明かされました。マクローリン級数を生み出したのが微分積分学にほかなりません。
微分積分学は英語でcalculusと呼ばれます。calculateは「計算する」という動詞、calculatorは「計算機」という名詞、pocket calculatorは「電卓」を表します。
calculusという名詞自体はそもそも「計算法」という意味です。calcはラテン語で「小石」という意味で、大昔計算に石が用いられていたことがcalc=計算の由来です。
マクローリン級数が示すように数値計算にとって微分積分は絶大な威力を発揮します。かくして、最強の計算法である微分積分はcalculusと呼ばれるようになりました。私はcalculator(電卓)からcalculus(微分積分学)に導かれたということです。
私が関数電卓の計算アルゴリズムの正体が、たし算とかけ算でできたマクローリン展開だと信じて疑わなかったことは言うまでもありません。ところが、そうではない衝撃の事実がずっと後になって知ることになります。続きはまた別な機会にしたいと思います。
今回の主人公マクローリンは、正式名コリン・マクローリン(1698-1746)と言い、スコットランドの数学者です。連載「対数の発見がもたらした大航海時代と技術革新」で紹介した対数の生みの親、ジョン・ネイピア(1550-1617)の故郷です。
微積分の父、ニュートン(1642-1727)にその才能を認められるほどでした。
次回は、ニュートン法による√の計算を取り上げます。
筆者:桜井 進
 
電卓は、ゼロ除算(1÷0・0÷0)できるでしょうか:
興味深く読みました:


\documentclass[12pt]{article}
\usepackage{latexsym,amsmath,amssymb,amsfonts,amstext,amsthm}
\numberwithin{equation}{section}
\begin{document}
\title{\bf Announcement 179: Division by zero is clear as z/0=0 and it is fundamental in mathematics\\
}
\author{{\it Institute of Reproducing Kernels}\\
Kawauchi-cho, 5-1648-16,\\
Kiryu 376-0041, Japan\\
\date{\today}
\maketitle
{\bf Abstract: } In this announcement, we shall introduce the zero division $z/0=0$. The result is a definite one and it is fundamental in mathematics.
\bigskip
\section{Introduction}
%\label{sect1}
By a natural extension of the fractions
\begin{equation}
\frac{b}{a}
\end{equation}
for any complex numbers $a$ and $b$, we, recently, found the surprising result, for any complex number $b$
\begin{equation}
\frac{b}{0}=0,
\end{equation}
incidentally in \cite{s} by the Tikhonov regularization for the Hadamard product inversions for matrices, and we discussed their properties and gave several physical interpretations on the general fractions in \cite{kmsy} for the case of real numbers. The result is a very special case for general fractional functions in \cite{cs}. 
The division by zero has a long and mysterious story over the world (see, for example, google site with division by zero) with its physical viewpoints since the document of zero in India on AD 628, however,
Sin-Ei, Takahasi (\cite{taka}) (see also \cite{kmsy}) established a simple and decisive interpretation (1.2) by analyzing some full extensions of fractions and by showing the complete characterization for the property (1.2). His result will show that our mathematics says that the result (1.2) should be accepted as a natural one:
\bigskip
{\bf Proposition. }{\it Let F be a function from ${\bf C }\times {\bf C }$ to ${\bf C }$ such that
$$
F (b, a)F (c, d)= F (bc, ad)
$$
for all
$$
a, b, c, d \in {\bf C }
$$
and
$$
F (b, a) = \frac {b}{a }, \quad a, b \in {\bf C }, a \ne 0.
$$
Then, we obtain, for any $b \in {\bf C } $
$$
F (b, 0) = 0.
$$
}
\medskip
\section{What are the fractions $ b/a$?}
For many mathematicians, the division $b/a$ will be considered as the inverse of product;
that is, the fraction
\begin{equation}
\frac{b}{a}
\end{equation}
is defined as the solution of the equation
\begin{equation}
a\cdot x= b.
\end{equation}
The idea and the equation (2.2) show that the division by zero is impossible, with a strong conclusion. Meanwhile, the problem has been a long and old question:
As a typical example of the division by zero, we shall recall the fundamental law by Newton:
\begin{equation}
F = G \frac{m_1 m_2}{r^2}
\end{equation}
for two masses $m_1, m_2$ with a distance $r$ and for a constant $G$. Of course,
\begin{equation}
\lim_{r \to +0} F =\infty,
\end{equation}
however, in our fraction
\begin{equation}
F = G \frac{m_1 m_2}{0} = 0.
\end{equation}
\medskip


Now, we shall introduce an another approach. The division $b/a$ may be defined {\bf independently of the product}. Indeed, in Japan, the division $b/a$ ; $b$ {\bf raru} $a$ ({\bf jozan}) is defined as how many $a$ exists in $b$, this idea comes from subtraction $a$ repeatedly. (Meanwhile, product comes from addition).
In Japanese language for "division", there exists such a concept independently of product.
H. Michiwaki and his 6 years old girl said for the result $ 100/0=0$ that the result is clear, from the meaning of the fractions independently the concept of product and they said:
$100/0=0$ does not mean that $100= 0 \times 0$. Meanwhile, many mathematicians had a confusion for the result.
Her understanding is reasonable and may be acceptable:
$100/2=50 \quad$ will mean that we divide 100 by 2, then each will have 50.
$100/10=10 \quad$ will mean that we divide 100 by10, then each will have 10.
$100/0=0 \quad$ will mean that we do not divide 100, and then nobody will have at all and so 0.
Furthermore, she said then the rest is 100; that is, mathematically;
$$
100 = 0\cdot 0 + 100.
$$
Now, all the mathematicians may accept the division by zero $100/0=0$ with natural feelings as a trivial one?
\medskip
For simplicity, we shall consider the numbers on non-negative real numbers. We wish to define the division (or fraction) $b/a$ following the usual procedure for its calculation, however, we have to take care for the division by zero:
The first principle, for example, for $100/2 $ we shall consider it as follows:
$$
100-2-2-2-,...,-2.
$$
How may times can we subtract $2$? At this case, it is 50 times and so, the fraction is $50$.
The second case, for example, for $3/2$ we shall consider it as follows:
$$
3 - 2 = 1
$$
and the rest (remainder) is $1$, and for the rest $1$, we multiple $10$,
then we consider similarly as follows:
$$
10-2-2-2-2-2=0.
$$
Therefore $10/2=5$ and so we define as follows:
$$
\frac{3}{2} =1 + 0.5 = 1.5.
$$
By these procedures, for $a \ne 0$ we can define the fraction $b/a$, usually. Here we do not need the concept of product. Except the zero division, all the results for fractions are valid and accepted.
Now, we shall consider the zero division, for example, $100/0$. Since
$$
100 - 0 = 100,
$$
that is, by the subtraction $100 - 0$, 100 does not decrease, so we can not say we subtract any from $100$. Therefore, the subtract number should be understood as zero; that is,
$$
\frac{100}{0} = 0.
$$
We can understand this: the division by $0$ means that it does not divide $100$ and so, the result is $0$.
Similarly, we can see that
$$
\frac{0}{0} =0.
$$
As a conclusion, we should define the zero divison as, for any $b$
$$
\frac{b}{0} =0.
$$
See \cite{kmsy} for the details.
\medskip

\section{In complex analysis}
We thus should consider, for any complex number $b$, as (1.2);
that is, for the mapping
\begin{equation}
w = \frac{1}{z},
\end{equation}
the image of $z=0$ is $w=0$. This fact seems to be a curious one in connection with our well-established popular image for the point at infinity on the Riemann sphere.
However, we shall recall the elementary function
\begin{equation}
W(z) = \exp \frac{1}{z}
\end{equation}
$$
= 1 + \frac{1}{1! z} + \frac{1}{2! z^2} + \frac{1}{3! z^3} + \cdot \cdot \cdot .
$$
The function has an essential singularity around the origin. When we consider (1.2), meanwhile, surprisingly enough, we have:
\begin{equation}
W(0) = 1.
\end{equation}
{\bf The point at infinity is not a number} and so we will not be able to consider the function (3.2) at the zero point $z = 0$, meanwhile, we can consider the value $1$ as in (3.3) at the zero point $z = 0$. How do we consider these situations?
In the famous standard textbook on Complex Analysis, L. V. Ahlfors (\cite{ahlfors}) introduced the point at infinity as a number and the Riemann sphere model as well known, however, our interpretation will be suitable as a number. We will not be able to accept the point at infinity as a number.
As a typical result, we can derive the surprising result: {\it At an isolated singular point of an analytic function, it takes a definite value }{\bf with a natural meaning.} As the important applications for this result, the extension formula of functions with analytic parameters may be obtained and singular integrals may be interpretated with the division by zero, naturally (\cite{msty}).
\bigskip
\section{Conclusion}
The division by zero $b/0=0$ is possible and the result is naturally determined, uniquely.
The result does not contradict with the present mathematics - however, in complex analysis, we need only to change a little presentation for the pole; not essentially, because we did not consider the division by zero, essentially.
The common understanding that the division by zero is impossible should be changed with many text books and mathematical science books. The definition of the fractions may be introduced by {\it the method of Michiwaki} in the elementary school, even.
Should we teach the beautiful fact, widely?:
For the elementary graph of the fundamental function
$$
y = f(x) = \frac{1}{x},
$$
$$
f(0) = 0.
$$
The result is applicable widely and will give a new understanding for the universe ({\bf Announcement 166}).
\medskip
If the division by zero $b/0=0$ is not introduced, then it seems that mathematics is incomplete in a sense, and by the intoduction of the division by zero, mathematics will become complete in a sense and perfectly beautiful.
\bigskip


section{Remarks}
For the procedure of the developing of the division by zero and for some general ideas on the division by zero, we presented the following announcements in Japanese:
\medskip
{\bf Announcement 148} (2014.2.12):  $100/0=0, 0/0=0$  --  by a natural extension of fractions -- A wish of the God
\medskip
{\bf Announcement 154} (2014.4.22): A new world: division by zero, a curious world, a new idea
\medskip
{\bf Announcement 157} (2014.5.8): We wish to know the idea of the God for the division by zero; why the infinity and zero point are coincident?
\medskip
{\bf Announcement 161} (2014.5.30): Learning from the division by zero, sprits of mathematics and of looking for the truth
\medskip
{\bf Announcement 163} (2014.6.17): The division by zero, an extremely pleasant mathematics - shall we look for the pleasant division by zero: a proposal for a fun club looking for the division by zero.
\medskip
{\bf Announcement 166} (2014.6.29): New general ideas for the universe from the viewpoint of the division by zero
\medskip
{\bf Announcement 171} (2014.7.30): The meanings of product and division -- The division by zero is trivial from the own sense of the division independently of the concept of product
\medskip
{\bf Announcement 176} (2014.8.9):  Should be changed the education of the division by zero
\bigskip
\bibliographystyle{plain}
\begin{thebibliography}{10}
\bibitem{ahlfors}
L. V. Ahlfors, Complex Analysis, McGraw-Hill Book Company, 1966.
\bibitem{cs}
L. P. Castro and S.Saitoh, Fractional functions and their representations, Complex Anal. Oper. Theory {\bf7} (2013), no. 4, 1049-1063.
\bibitem{kmsy}
S. Koshiba, H. Michiwaki, S. Saitoh and M. Yamane,
An interpretation of the division by zero z/0=0 without the concept of product
(note).
\bibitem{kmsy}
M. Kuroda, H. Michiwaki, S. Saitoh, and M. Yamane,
New meanings of the division by zero and interpretations on $100/0=0$ and on $0/0=0$,
Int. J. Appl. Math. Vol. 27, No 2 (2014), pp. 191-198, DOI: 10.12732/ijam.v27i2.9.
\bibitem{msty}
H. Michiwaki, S. Saitoh, M. Takagi and M. Yamada,
A new concept for the point at infinity and the division by zero z/0=0
(note).
\bibitem{s}
S. Saitoh, Generalized inversions of Hadamard and tensor products for matrices, Advances in Linear Algebra \& Matrix Theory. Vol.4 No.2 (2014), 87-95. http://www.scirp.org/journal/ALAMT/
\bibitem{taka}
S.-E. Takahasi,
{On the identities $100/0=0$ and $ 0/0=0$}
(note).
\bibitem{ttk}
S.-E. Takahasi, M. Tsukada and Y. Kobayashi, Classification of continuous fractional binary operators on the real and complex fields. (submitted)
\end{thebibliography}
\end{document}

Title page of Leonhard Euler, Vollständige Anleitung zur Algebra, Vol. 1 (edition of 1771, first published in 1770), and p. 34 from Article 83, where Euler explains why a number divided by zero gives infinity.

私は数学を信じない。 アルバート・アインシュタイン / I don't believe in mathematics. Albert Einstein→ゼロ除算ができなかったからではないでしょうか。
1423793753.460.341866474681

Einstein's Only Mistake: Division by Zero

0 件のコメント:

コメントを投稿