[BACK]Return to cmo-basic1.tex CVS log [TXT][DIR] Up to [local] / OpenXM / doc / OpenXM-specs

Diff for /OpenXM/doc/OpenXM-specs/cmo-basic1.tex between version 1.2 and 1.3

version 1.2, 2000/01/23 00:41:08 version 1.3, 2000/01/23 05:28:33
Line 134  Tree, Lambda $\in$ CMObject/Basic1. \\
Line 134  Tree, Lambda $\in$ CMObject/Basic1. \\
 \end{eqnarray*}  \end{eqnarray*}
 */  */
   
 /*&C  
   
 */  
   
 /*&jp  /*&jp
 数式を処理するシステムでは, Tree 構造が一般にもちいられる.  数式を処理するシステムでは, Tree 構造が一般にもちいられる.
 たとえば, $\sin(x+e)$ は,  たとえば, $\sin(x+e)$ は,
Line 164  For example,
Line 160  For example,
 $\sin(x+e)$ is expressed as  $\sin(x+e)$ is expressed as
 {\tt (sin, (plus, x, e))}  {\tt (sin, (plus, x, e))}
 as a tree.  as a tree.
 We can   @@@  Tree may be expressed by putting itself between
   {\tt SM\_beginBlock} and {\tt SM\_endBlock}, which are
   stack machine commands for delayed evaluation.
   (cf. {\tt \{ }, {\tt \} } in PostScript).
   However it makes the implementation of stack machines complicated.
   It is desirable that CMObject is independent of OX stack machine.
   Therefore we introduce an OpenMath like tree representation for CMO
   tree object.
   This method allows us to implement tree structure easily
   on individual OpenXM systems.
   Note that CMO Tree corresponds to Symbol and Application in OpenMath.
 */  */
   
   
Line 174 
Line 180 
 /*&jp  /*&jp
 Lambda は関数を定義するための関数である.  Lambda は関数を定義するための関数である.
 Lisp の Lambda 表現と同じ.  Lisp の Lambda 表現と同じ.
   */
   /*&eg
   Lambda is used to define functions.
   It is the same as the Lambda expression in Lisp.
   */
   
 \noindent  \noindent
 例: $sin(x+e)$ の表現.  //&jp 例: $sin(x+e)$ の表現.
   //&eg Example: the expression of $sin(x+e)$.
 \begin{verbatim}  \begin{verbatim}
 (CMO_TREE, (CMO_STRING, "sin"), (CMO_STRING, "basic"),  (CMO_TREE, (CMO_STRING, "sin"), (CMO_STRING, "basic"),
     (CMO_LIST,[size=]1,      (CMO_LIST,[size=]1,
         (CMO_TREE, (CMO_STRING, "plus"), (CMO_STRING, "basic"),          (CMO_TREE, (CMO_STRING, "plus"), (CMO_STRING, "basic"),
             (CMO_LIST,[size=]2, (CMO_INDETERMINATE,"x"),              (CMO_LIST,[size=]2, (CMO_INDETERMINATE,"x"),
                                 (CMO_TREE,(CMO_STRING, "e"),  自然対数の底  //&jp                                (CMO_TREE,(CMO_STRING, "e"),  自然対数の底
   //&eg                                (CMO_TREE,(CMO_STRING, "e"),  Napier's number
                                           (CMO_STRING, "basic"))                                            (CMO_STRING, "basic"))
         ))          ))
     )      )
Line 199  Class.tree [    $plus$ , $Basic$ , [    123 , 345 ]  ]
Line 212  Class.tree [    $plus$ , $Basic$ , [    123 , 345 ]  ]
   
   
 \bigbreak  \bigbreak
 次に, 分散表現多項式に関係するグループを定義しよう.  //&jp 次に, 分散表現多項式に関係するグループを定義しよう.
   //&eg Let us define a group for distributed polynomials.
   
 \medbreak  \medbreak
 \noindent  \noindent
Line 208  CMObject/Basic1. \\
Line 222  CMObject/Basic1. \\
 Monomial, Monomial32, Coefficient, Dpolynomial, DringDefinition,  Monomial, Monomial32, Coefficient, Dpolynomial, DringDefinition,
 Generic DMS ring, RingByName, DMS of N variables $\in$  Generic DMS ring, RingByName, DMS of N variables $\in$
 CMObject/DistributedPolynomials. \\  CMObject/DistributedPolynomials. \\
   /*&jp
 \begin{eqnarray*}  \begin{eqnarray*}
 \mbox{Monomial} &:& \mbox{Monomial32}\, |\, \mbox{Zero} \\  \mbox{Monomial} &:& \mbox{Monomial32}\, |\, \mbox{Zero} \\
 \mbox{Monomial32}&:& ({\tt CMO\_MONOMIAL32}, {\sl int32}\, n,  \mbox{Monomial32}&:& ({\tt CMO\_MONOMIAL32}, {\sl int32}\, n,
Line 249  $x^e = x_1^{e_1} \cdots x_n^{e_n}$ の各指数 $e_i$
Line 264  $x^e = x_1^{e_1} \cdots x_n^{e_n}$ の各指数 $e_i$
 & & \mbox{ --- wvec は order をきめる weight vector,} \\  & & \mbox{ --- wvec は order をきめる weight vector,} \\
 & & \mbox{ --- outord は出力するときの変数順序.} \\  & & \mbox{ --- outord は出力するときの変数順序.} \\
 \end{eqnarray*}  \end{eqnarray*}
   */
   /*&eg
   \begin{eqnarray*}
   \mbox{Monomial} &:& \mbox{Monomial32}\, |\, \mbox{Zero} \\
   \mbox{Monomial32}&:& ({\tt CMO\_MONOMIAL32}, {\sl int32}\, n,
                         {\sl int32}\, \mbox{e[1]}, \ldots,
                         {\sl int32}\, \mbox{e[n]}, \\
                    & & \ \mbox{Coefficient}) \\
                    & & \mbox{ --- e[i] is the exponent $e_i$ of the monomial
                         $x^e = x_1^{e_1} \cdots x_n^{e_n}$. } \\
   \mbox{Coefficient}&:& \mbox{ZZ} | \mbox{Integer32} \\
   \mbox{Dpolynomial}&:& \mbox{Zero} \\
                    & & |\ ({\tt CMO\_DISTRIBUTED\_POLYNOMIAL},{\sl int32} m, \\
                    & & \ \ \mbox{DringDefinition}, [\mbox{Monomial32}|\mbox{Zero}], \\
                    & &\ \
                       \{\mbox{Monomial32}\})  \\
                    & &\mbox{--- m is equal to the number of monomials.}\\
   \mbox{DringDefinition}
                    &:& \mbox{DMS of N variables} \\
                    & & |\ \mbox{RingByName} \\
                    & & |\ \mbox{Generic DMS ring} \\
                    & & \mbox{ --- definition of the ring of distributed polynomials. } \\
   \mbox{Generic DMS ring}
                    &:& ({\tt CMO\_DMS\_GENERIC}) \\
   \mbox{RingByName}&:& ({\tt CMO\_RING\_BY\_NAME}, {\sl Cstring} s) \\
                    & & \mbox{ --- The ring definition refered by the name ``s''.} \\
   \mbox{DMS of N variables}
                    &:& ({\tt CMO\_DMS\_OF\_N\_VARIABLES}, \\
                    & & \ ({\tt CMO\_LIST}, {\sl int32}\, \mbox{m},
                     {\sl Integer32}\,  \mbox{n}, {\sl Integer32}\, \mbox{p} \\
                    & & \ \ [,{\sl Cstring}\,\mbox{s}, {\sl List}\, \mbox{vlist},
                             {\sl List}\, \mbox{wvec}, {\sl List}\, \mbox{outord}]) \\
                    & & \mbox{ --- m is the number of elements.} \\
                    & & \mbox{ --- n is the number of variables, p is the characteristic} \\
                    & & \mbox{ --- s is the name of the ring, vlist is the list of variables.} \\
                    & & \mbox{ --- wvec is the weight vector.} \\
                    & & \mbox{ --- outord is the order of variables to output.} \\
   \end{eqnarray*}
   */
   
   /*&jp
 RingByName や DMS of N variables はなくても, DMS を定義できる.  RingByName や DMS of N variables はなくても, DMS を定義できる.
 したがって, これらを実装してないシステムで DMS を扱うものが  したがって, これらを実装してないシステムで DMS を扱うものが
 あってもかまわない.  あってもかまわない.
   
 以下, 以上の CMObject  にたいする,  以下, 以上の CMObject  にたいする,
 xxx = asir, kan の振舞いを記述する.  xxx = asir, kan の振舞いを記述する.
   */
   /*&eg
   Note that it is possible to define DMS without RingByName and
   DMS of N variables.
   
   In the following we describe how the above CMObjects
   are implemented on Asir and Kan.
   */
   
 \subsection{ Zero}  \subsection{ Zero}
 CMO では ゼロの表現法がなんとうりもあるが,  /*&jp
   CMO では ゼロの表現法がなんとおりもあるが,
 どのようなゼロをうけとっても,  どのようなゼロをうけとっても,
 システムのゼロに変換できるべきである.  システムのゼロに変換できるべきである.
 (たとえば, asir は 0 はただ一つ.)  */
   /*&eg
   Though CMO has various representations of zero,
   each representation should be translated into zero
   in the system.
   */
   
   
   //&jp \subsection{ 整数 ZZ }
   //&eg \subsection{ Integer ZZ }
   
 \subsection{ 整数 ZZ }  
   
 \begin{verbatim}  \begin{verbatim}
 #define     CMO_ZZ          20  #define     CMO_ZZ          20
 \end{verbatim}  \end{verbatim}
   
   /*&jp
   この節ではOpen xxx 規約における任意の大きさの整数(bignum)の扱いについ
   て説明する.  Open XM 規約における多重精度整数を表すデータ型 CMO\_ZZ は
   GNU MPライブラリなどを参考にして設計されていて, 符号付き絶対値表現を用
   いている.  (cf. {\tt kan/sm1} の配布ディレクトリのなかの {\tt
   plugin/cmo-gmp.c}) CMO\_ZZ は次の形式をとる.
   */
   /*&eg
   We describe the bignum (multi-precision integer) representation in OpenXM.
   In OpenXM {\tt CMO\_ZZ} is used to represent bignum. Its design is similar
   to that in GNU MP. (cf. {\tt plugin/cmo-gmp.c} in the {\tt kan/sm1}
   distribution). CMO\_ZZ is defined as follows.
   */
   
 この節ではOpen xxx 規約における任意の大きさの整数(bignum)の扱いについて  
 説明する.  
 Open XM 規約における多重精度整数を表すデータ型 CMO\_ZZ は GNU MPライブ  
 ラリなどを参考にして設計されていて, 符号付き絶対値表現を用いている.  
 (cf. {\tt kan/sm1} の配布ディレクトリのなかの {\tt plugin/cmo-gmp.c})  
 CMO\_ZZ は次の形式をとる.\\  
 \begin{tabular}{|c|c|c|c|c|}  \begin{tabular}{|c|c|c|c|c|}
 \hline  \hline
 {\tt int32 CMO\_ZZ} & {\tt int32 $f$} & {\tt int32 $b_0$} & $\cdots$ &  {\tt int32 CMO\_ZZ} & {\tt int32 $f$} & {\tt int32 $b_0$} & $\cdots$ &
 {\tt int32 $b_{n}$} \\  {\tt int32 $b_{n}$} \\
 \hline  \hline
 \end{tabular} \\  \end{tabular}
 $f$ は32bit整数である.  
 $b_0, \ldots, b_n$ は unsigned int32 である.  
 $|f|$ は $n+1$ である.  
 この CMO の符号は $f$ の符号で定める.  
 前述したように, 32bit整数の負数は 2 の補数表現で表される.  
   
 Open xxx 規約では上の CMO は以下の整数を意味する.  /*&jp
   $f$ は32bit整数である.  $b_0, \ldots, b_n$ は unsigned int32 である.
   $|f|$ は $n+1$ である.  この CMO の符号は $f$ の符号で定める.  前述し
   たように, 32bit整数の負数は 2 の補数表現で表される.
   
   Open xxx 規約では上の CMO は以下の整数を意味する. ($R = 2^{32}$)
   */
   /*&eg
   $f$ is a 32bit integer. $b_0, \ldots, b_n$ are unsigned 32bit integers.
   $|f|$ is equal to $n+1$.
   The sign of $f$ represents that of the above CMO. As stated in Section
   \ref{sec:basic0}, a negative 32bit integer is represented by
   two's complement.
   
   In OpenXM the above CMO represents the following integer. ($R = 2^{32}$.)
   */
   
 \[  \[
 \mbox{sgn}(f)\times (b_0 R^{0}+ b_1 R^{1} + \cdots + b_{n-1}R^{n-1} + b_n R^n).  \mbox{sgn}(f)\times (b_0 R^{0}+ b_1 R^{1} + \cdots + b_{n-1}R^{n-1} + b_n R^n).
 \]  \]
 ここで $R = 2^{32}$ である.  
 {\tt int32} を network byte order で表現しているとすると,  /*&jp
 例えば, 整数 $14$ は CMO\_ZZ で表わすと,  {\tt int32} を network byte order で表現
   しているとすると,例えば, 整数 $14$ は CMO\_ZZ で表わすと,
   */
   /*&eg
   If we express {\tt int32} by the network byte order,
   a CMO\_ZZ $14$ is expressed by
   */
 \[  \[
 \mbox{(CMO\_ZZ, 1, 0, 0, 0, e)},  \mbox{(CMO\_ZZ, 1, 0, 0, 0, e)},
 \]  \]
 と表わす.  //&jp と表わす. これはバイト列では
 これはバイト列では  //&egThe corresponding byte sequence is
 \[  \[
 \mbox{\tt 00 00 00 14 00 00 00 01 00 00 00 0e}  \mbox{\tt 00 00 00 14 00 00 00 01 00 00 00 0e}
 \]  \]
 となる.  //&jp となる.
   
   
 なお ZZ の 0  ( (ZZ) 0 と書く ) は,  //&jp なお ZZ の 0 ( (ZZ) 0 と書く ) は, {\tt (CMO\_ZZ, 00,00,00,00)} と表現する.
 {\tt (CMO\_ZZ, 00,00,00,00)}  //&eg Note that CMO\_ZZ 0 is expressed by {\tt (CMO\_ZZ, 00,00,00,00)}.
 と表現する.  
   
   
 \subsection{ 分散表現多項式 Dpolynomial }  //&jp \subsection{ 分散表現多項式 Dpolynomial }
   //&eg \subsection{ Distributed polynomial Dpolynomial }
   
   /*&jp
 環とそれに属する多項式は次のような考えかたであつかう.  環とそれに属する多項式は次のような考えかたであつかう.
   
 Generic DMS ring に属する元は,  Generic DMS ring に属する元は,
Line 343  Ring by Name を用いた場合, 現在の名前空間で変数 yyy に
Line 437  Ring by Name を用いた場合, 現在の名前空間で変数 yyy に
 {\tt kan/sm1} の場合, 環の定義は ring object として格納されており,  {\tt kan/sm1} の場合, 環の定義は ring object として格納されており,
 この ring object を 変数 yyy で参照することにより CMO としてうけとった  この ring object を 変数 yyy で参照することにより CMO としてうけとった
 多項式をこの ring の元として格納できる.  多項式をこの ring の元として格納できる.
   */
   
   /*&eg
   We treat polynomial rings and their elements as follows.
   
   An element of a generic DMS ring is an element of
   an $n$-variate polynomial ring $K[x_1, \ldots, x_n]$,
   where $K$ is some coefficient set. $K$ is unknown in advance
   and it is determined when coefficients are received.
   When a server has received an element in a generic DMS ring,
   the server has to translate it into the corresponding local object
   on the server. Each server has its own translation scheme.
   
   In Asir such an element are translated into a distributed polynomial.
   
   In {\tt kan/sm1} things are complicated.
   {\tt kan/sm1} does not have any class corresponding to a generic DMS ring.
   {\tt kan/sm1} translates a DMS of N variables into an element of
   the CurrentRing.
   If the CurrentRing is $n'$-variate and $n' < n$, then
   a polynomial ring is newly created. Optional informations such as
   the term order are all ignored.
   
   If RingbyName ({\tt CMO\_RING\_BY\_NAME}, yyy)
   is specified as the second field of DMS,
   it requests a sever to use a ring object whose name is yyy
   as the destination ring for the translation.
   This is done in {\tt kan/sm1}.
   */
   
 \medbreak \noindent  \medbreak \noindent
 {\bf Example}:  //&jp {\bf Example}: (すべての数の表記は 16 進表記)
 (すべての数の表記は 16 進表記)  //&eg {\bf Example}: (all numbers are represented in hexadecimal notation)
 {\footnotesize \begin{verbatim}  {\footnotesize \begin{verbatim}
 Z/11Z [6 variables]  Z/11Z [6 variables]
 (kxx/cmotest.sm1) run  (kxx/cmotest.sm1) run
Line 369  ff omc ::
Line 488  ff omc ::
  (CMO_DISTRIBUTED_POLYNOMIAL[1f],[size=]1,(CMO_DMS_GENERIC[18],),   (CMO_DISTRIBUTED_POLYNOMIAL[1f],[size=]1,(CMO_DMS_GENERIC[18],),
   (CMO_MONOMIAL32[13],3*x^2*y),),    (CMO_MONOMIAL32[13],3*x^2*y),),
 \end{verbatim} }  \end{verbatim} }
 length は, monomial の数$+2$ である.  /*&jp
 $ 3 x^2 y$ は 6 変数の多項式環の元としてみなされている.  $ 3 x^2 y$ は 6 変数の多項式環の 元としてみなされている.
 %%Prog: (3x^2 y). cmosave   ===> debug/cmodata1.cmo  */
 %%\\ 反省: 分散多項式の定義で,  /*&eg
 %%{\tt CMO\_LIST} でなく, {\tt CMO\_DMS} がはじめにくるべきだったのでは?  $3 x^2 y$ is regarded as an element of a six-variate polynomial ring.
 %%あたらしい 分散多項式の定義は次のようにすべき:  */
 %% 修正済み. 1999, 9/13  
   
   
   //&jp \subsection{再帰表現多項式の定義}
   //&eg \subsection{Recursive polynomials}
   
 \subsection{再帰表現多項式の定義}  
   
 \begin{verbatim}  \begin{verbatim}
 #define CMO_RECURSIVE_POLYNOMIAL        27  #define CMO_RECURSIVE_POLYNOMIAL        27
 #define CMO_POLYNOMIAL_IN_ONE_VARIABLE  33  #define CMO_POLYNOMIAL_IN_ONE_VARIABLE  33
Line 391  Polynomial in 1 variable, Coefficient, Name of the mai
Line 509  Polynomial in 1 variable, Coefficient, Name of the mai
 Recursive Polynomial, Ring definition for recursive polynomials  Recursive Polynomial, Ring definition for recursive polynomials
 $\in$ CMObject/RecursivePolynomial \\  $\in$ CMObject/RecursivePolynomial \\
   
   /*&jp
 \begin{eqnarray*}  \begin{eqnarray*}
 \mbox{Polynomial in 1 variable} &:&  \mbox{Polynomial in 1 variable} &:&
 \mbox{({\tt CMO\_POLYNOMIAL\_IN\_ONE\_VARIABLE},\, {\sl int32}\, m, } \\  \mbox{({\tt CMO\_POLYNOMIAL\_IN\_ONE\_VARIABLE},\, {\sl int32}\, m, } \\
Line 409  $\in$ CMObject/RecursivePolynomial \\
Line 528  $\in$ CMObject/RecursivePolynomial \\
 & & \mbox{ --- v は 変数番号 (0 からはじまる) を表す. } \\  & & \mbox{ --- v は 変数番号 (0 からはじまる) を表す. } \\
 \mbox{Recursive Polynomial} &:&  \mbox{Recursive Polynomial} &:&
 \mbox{ ( {\tt CMO\_RECURSIVE\_POLYNOMIAL}, } \\  \mbox{ ( {\tt CMO\_RECURSIVE\_POLYNOMIAL}, } \\
 & & \quad \mbox{ Ring definition for  & & \quad \mbox{ RringDefinition, } \\
 recursive polynomials, } \\  
 & & \quad  & & \quad
 \mbox{ Polynomial in 1 variable}\, | \, \mbox{Coefficient}   \\  \mbox{ Polynomial in 1 variable}\, | \, \mbox{Coefficient}   \\
 \mbox{Ring definition for recursive polynomials }  \mbox{RringDefinition}
 & : &  \mbox{ {\sl List} v } \\  & : &  \mbox{ {\sl List} v } \\
 & & \quad \mbox{ --- v は, 変数名(indeterminate) のリスト. } \\  & & \quad \mbox{ --- v は, 変数名(indeterminate) のリスト. } \\
 & & \quad \mbox{ --- 順序の高い順. } \\  & & \quad \mbox{ --- 順序の高い順. } \\
 \end{eqnarray*}  \end{eqnarray*}
   */
   /*&eg
   \begin{eqnarray*}
   \mbox{Polynomial in 1 variable} &:&
   \mbox{({\tt CMO\_POLYNOMIAL\_IN\_ONE\_VARIABLE},\, {\sl int32}\, m, } \\
   & & \quad \mbox{ Name of the main variable }, \\
   & & \quad \mbox{ \{ {\sl int32} e, Coefficient \}} \\
   & & \mbox{ --- m is the number of monimials. } \\
   & & \mbox{ --- A pair of e and Coefficieint represents a monomial. } \\
   & & \mbox{ --- The pairs of e and Coefficient are sorted in the } \\
   & & \mbox{ \quad decreasing order, usually with respect to e.} \\
   & & \mbox{ ---  e denotes an exponent of a monomial with respect to } \\
   & & \mbox{ \quad the main variable. } \\
   \mbox{Coefficient} &:& \mbox{ ZZ} \,|\, \mbox{ QQ } \,|\,
   \mbox{ integer32  } \,|\,
   \mbox{ Polynomial in 1 variable } \\
   & & \quad \,|\, \mbox{Tree} \,|\, \mbox{Zero} \,|\,\mbox{Dpolynomial}\\
   \mbox{Name of the main variable } &:&
   \mbox{ {\sl int32} v }   \\
   & & \mbox{ --- v denotes a variable number. } \\
   \mbox{Recursive Polynomial} &:&
   \mbox{ ( {\tt CMO\_RECURSIVE\_POLYNOMIAL}, } \\
   & & \quad \mbox{ RringDefinition, } \\
   & & \quad
   \mbox{ Polynomial in 1 variable}\, | \, \mbox{Coefficient}   \\
   \mbox{RringDefinition}
   & : &  \mbox{ {\sl List} v } \\
   & & \quad \mbox{ --- v is a list of names of indeterminates. } \\
   & & \quad \mbox{ --- It is sorted in the decreasing order. } \\
   \end{eqnarray*}
   */
 \bigbreak  \bigbreak
 \noindent  \noindent
 実例:  Example:
 \begin{verbatim}  \begin{verbatim}
 (CMO_RECURSIEVE_POLYNOMIAL, ("x","y"),  (CMO_RECURSIEVE_POLYNOMIAL, ("x","y"),
 (CMO_POLYNOMIAL_IN_ONE_VARIABLE, 2,      0,  <--- "x"  (CMO_POLYNOMIAL_IN_ONE_VARIABLE, 2,      0,  <--- "x"
Line 432  recursive polynomials, } \\
Line 580  recursive polynomials, } \\
        10, 1,         10, 1,
        5, 31)))         5, 31)))
 \end{verbatim}  \end{verbatim}
 これは,  //&jp これは,
 $$   x^3 (1234 y^5 + 17 ) +  x^1 (y^10 + 31 y^5)  $$  //&eg This represents
   $$   x^3 (1234 y^5 + 17 ) +  x^1 (y^{10} + 31 y^5)  $$
   /*&jp
 をあらわす.  をあらわす.
 非可換多項式もこの形式であらわしたいので, 積の順序を上のように  非可換多項式もこの形式であらわしたいので, 積の順序を上のように
 すること. つまり, 主変数かける係数の順番.  すること. つまり, 主変数かける係数の順番.
   */
   /*&eg
   We intend to represent non-commutative polynomials with the
   same form. In such a case, the order of products are defined
   as above, that is a power of the mail variable $\times$ a coeffcient.
   */
   
 \noindent  \noindent
 \begin{verbatim}  \begin{verbatim}
Line 446  sm1>ff ::
Line 602  sm1>ff ::
 Class.recursivePolynomial h * ((-1)) + (x^2  * (1))  Class.recursivePolynomial h * ((-1)) + (x^2  * (1))
 \end{verbatim}  \end{verbatim}
   
   //&jp \subsection{CPU依存の double }
   //&eg \subsection{CPU dependent double}
   
   
 int32 と Integer32 の違い.  
 次にくるデータがかならず int32 とわかっておれば,  
 int32 を用いる.  
 次のデータ型がわからないとき Integer32 を用いる.  
   
   
 \subsection{CPU依存の double }  
   
 \begin{verbatim}  \begin{verbatim}
 #define CMO_64BIT_MACHINE_DOUBLE   40  #define CMO_64BIT_MACHINE_DOUBLE   40
 #define CMO_ARRAY_OF_64BIT_MACHINE_DOUBLE  41  #define CMO_ARRAY_OF_64BIT_MACHINE_DOUBLE  41
Line 469  Group CMObject/MachineDouble requires CMObject/Basic0.
Line 618  Group CMObject/MachineDouble requires CMObject/Basic0.
 128bit machine double, Array of 128bit machine double  128bit machine double, Array of 128bit machine double
 $\in$ CMObject/MachineDouble \\  $\in$ CMObject/MachineDouble \\
   
   /*&jp
 \begin{eqnarray*}  \begin{eqnarray*}
 \mbox{64bit machine double} &:&  \mbox{64bit machine double} &:&
 \mbox{({\tt CMO\_64BIT\_MACHINE\_DOUBLE}, } \\  \mbox{({\tt CMO\_64BIT\_MACHINE\_DOUBLE}, } \\
Line 495  $\in$ CMObject/MachineDouble \\
Line 645  $\in$ CMObject/MachineDouble \\
 & & \mbox{ --- この表現はCPU依存である.}\\  & & \mbox{ --- この表現はCPU依存である.}\\
 & & \mbox{ \quad\quad mathcap に CPU 情報を付加しておく.}  & & \mbox{ \quad\quad mathcap に CPU 情報を付加しておく.}
 \end{eqnarray*}  \end{eqnarray*}
   */
   /*&eg
   \begin{eqnarray*}
   \mbox{64bit machine double} &:&
   \mbox{({\tt CMO\_64BIT\_MACHINE\_DOUBLE}, } \\
   & & \quad \mbox{ {\sl byte} s1 , \ldots , {\sl byte}} s8)\\
   & & \mbox{ --- s1, $\ldots$, s8 は {\tt double} (64bit). } \\
   & & \mbox{ --- This depends on CPU.}\\
   &&  \mbox{\quad\quad Add informations on CPU to the mathcap.} \\
   \mbox{Array of 64bit machine double} &:&
   \mbox{({\tt CMO\_ARRAY\_OF\_64BIT\_MACHINE\_DOUBLE}, {\sl int32} m, } \\
   & & \quad \mbox{ {\sl byte} s1[1] , \ldots , {\sl byte}}\, s8[1], \ldots , {\sl byte}\, s8[m])\\
   & & \mbox{ --- s*[1], $\ldots$ s*[m] are 64bit double's. } \\
   & & \mbox{ --- This depends on CPU.}\\
   & & \mbox{\quad\quad Add informations on CPU to the mathcap.} \\
   \mbox{128bit machine double} &:&
   \mbox{({\tt CMO\_128BIT\_MACHINE\_DOUBLE}, } \\
   & & \quad \mbox{ {\sl byte} s1 , \ldots , {\sl byte}} s16)\\
   & & \mbox{ --- s1, $\ldots$, s16 は {\tt long double} (128bit). } \\
   & & \mbox{ --- This depends on CPU.}\\
   & & \mbox{\quad\quad Add informations on CPU to the mathcap.} \\
   \mbox{Array of 128bit machine double} &:&
   \mbox{({\tt CMO\_ARRAY\_OF\_128BIT\_MACHINE\_DOUBLE}, {\sl int32} m, } \\
   & & \quad \mbox{ {\sl byte} s1[1] , \ldots , {\sl byte}} s16[1], \ldots , {\sl byte} s16[m])\\
   & & \mbox{ --- s*[1], $\ldots$ s*[m] are 128bit long double's. } \\
   & & \mbox{ --- This depends on CPU.}\\
   & & \mbox{\quad\quad Add informations on CPU to the mathcap.} \\
   \end{eqnarray*}
   */
   
 \bigbreak  \bigbreak
 次に IEEE 準拠の float および Big float を定義しよう.  //&jp 次に IEEE 準拠の float および Big float を定義しよう.
   //&eg We define IEEE conformant float and big float.
 \begin{verbatim}  \begin{verbatim}
 #define CMO_BIGFLOAT   50  #define CMO_BIGFLOAT   50
 #define CMO_IEEE_DOUBLE_FLOAT 51  #define CMO_IEEE_DOUBLE_FLOAT 51
 \end{verbatim}  \end{verbatim}
   
 IEEE 準拠の float については,  /*&jp
 IEEE 754  double precision floating-point format  IEEE 準拠の float については, IEEE 754 double precision floating-point
 (64 bit) の定義を見よ.  format (64 bit) の定義を見よ.
   */
   /*&eg
   See IEEE 754 double precision floating-point (64 bit) for the details of IEEE
   conformant float.
   */
   
 \noindent  \noindent
 Group CMObject/Bigfloat requires CMObject/Basic0, CMObject/Basic1.\\  Group CMObject/Bigfloat requires CMObject/Basic0, CMObject/Basic1.\\
Line 516  $\in$ CMObject/Bigfloat \\
Line 701  $\in$ CMObject/Bigfloat \\
 \mbox{Bigfloat} &:&  \mbox{Bigfloat} &:&
 \mbox{({\tt CMO\_BIGFLOAT}, } \\  \mbox{({\tt CMO\_BIGFLOAT}, } \\
 & & \quad \mbox{ {\sl ZZ} a , {\sl ZZ} e})\\  & & \quad \mbox{ {\sl ZZ} a , {\sl ZZ} e})\\
 & & \mbox{ --- $a \times 2^e$ をあらわす. } \\  & & \mbox{ --- $a \times 2^e$. } \\
 \end{eqnarray*}  \end{eqnarray*}
   
   
 */  

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>