[BACK]Return to numeric.texi CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-doc / parts / builtin

Annotation of OpenXM/src/asir-doc/parts/builtin/numeric.texi, Revision 1.2

1.2     ! ohara       1: @comment $OpenXM: OpenXM/src/asir-doc/parts/builtin/numeric.texi,v 1.1 2003/12/20 13:38:44 ohara Exp $
1.1       ohara       2: \BJP
                      3: @node $B?tCMH!?t(B,,, $BAH$_9~$_H!?t(B
                      4: @section $B?tCMH!?t(B
                      5: \E
                      6: \BEG
                      7: @node Numerical functions,,, Built-in Function
                      8: @section Numerical functions
                      9: \E
                     10:
                     11: @menu
                     12: * dacos dasin datan dcos dsin dtan::
                     13: * dabs dexp dlog dsqrt::
                     14: * ceil floor rint dceil dfloor drint::
                     15: @end menu
                     16:
                     17: \JP @node dacos dasin datan dcos dsin dtan,,, $B?tCMH!?t(B
                     18: \EG @node dacos dasin datan dcos dsin dtan,,, Numerical functions
                     19: @subsection @code{dacos}, @code{dasin}, @code{datan}, @code{dcos}, @code{dsin}, @code{dtan}
                     20: @findex dacos
                     21: @findex dasin
                     22: @findex datan
                     23: @findex dcos
                     24: @findex dsin
                     25: @findex dtan
                     26:
                     27: @table @t
                     28: @item dacos(@var{num})
                     29: \JP :: $BH!?tCM(B Arccos(@var{num}) $B$r5a$a$k(B.
                     30: \EG :: Get the value of Arccos of @var{num}.
                     31: @item dasin(@var{num})
                     32: \JP :: $BH!?tCM(B Arcsin(@var{num}) $B$r5a$a$k(B.
                     33: \EG :: Get the value of Arcsin of @var{num}.
                     34: @item datan(@var{num})
                     35: \JP :: $BH!?tCM(B Arctan(@var{num}) $B$r5a$a$k(B.
                     36: \EG :: Get the value of Arctan of @var{num}.
                     37: @item dcos(@var{num})
                     38: \JP :: $BH!?tCM(B cos(@var{num}) $B$r5a$a$k(B.
                     39: \EG :: Get the value of cos of @var{num}.
                     40: @item dsin(@var{num})
                     41: \JP :: $BH!?tCM(B sin(@var{num}) $B$r5a$a$k(B.
                     42: \EG :: Get the value of sin of @var{num}.
                     43: @item dtan(@var{num})
                     44: \JP :: $BH!?tCM(B tan(@var{num}) $B$r5a$a$k(B.
                     45: \EG :: Get the value of tan of @var{num}.
                     46: @end table
                     47:
                     48: @table @var
                     49: @item return
                     50: \JP $BG\@:EYIbF0>.?t(B
                     51: \EG floating point number
                     52: @item num
                     53: \JP $B?t(B
                     54: \EG number
                     55: @end table
                     56:
                     57: @itemize @bullet
                     58: \BJP
                     59: @item
                     60: $B;03Q4X?t!"5U;03Q4X?t$r?tCME*$K7W;;$9$k(B.
                     61: @item
                     62: $B$3$l$i$NH!?t$O(B C $B8@8l$NI8=`?t3X%i%$%V%i%j$rMQ$$$k(B.
                     63: $B$7$?$,$C$F(B, $B7W;;7k2L$O%*%Z%l!<%F%#%s%0%7%9%F%`$H%3%s%Q%$%i$K0MB8$9$k(B.
                     64: @item
1.2     ! ohara      65: $BJ#AG?t$KBP$7$F$O@5$7$/$J$$7k2L$rJV$9$N$GCm0U$7$J$1$l$P$J$i$J$$(B.
        !            66: @item
        !            67: @@pi $B$J$I$N%7%s%\%k$r0z?t$KM?$($k$3$H$O$G$-$J$$(B.
1.1       ohara      68: \E
                     69: \BEG
                     70: @item
                     71: Compute numerical values of trigonometric functions.
                     72: @item
                     73: These functions use the standard mathematical library of C language.
                     74: So results depend on operating systems and a C compilers.
                     75: \E
                     76: @end itemize
                     77:
                     78: @example
                     79: [0] 4*datan(1);
                     80: 3.14159
                     81: @end example
                     82:
                     83: \JP @node dabs dexp dlog dsqrt,,, $B?tCMH!?t(B
                     84: \EG @node dabs dexp dlog dsqrt,,, Numerical functions
                     85: @subsection @code{dabs}, @code{dexp}, @code{dlog}, @code{dsqrt}
                     86: @findex dabs
                     87: @findex dexp
                     88: @findex dlog
                     89: @findex dsqrt
                     90:
                     91: @table @t
                     92: @item dabs(@var{num})
                     93: \JP :: $B@dBPCM(B |@var{num}| $B$r5a$a$k(B.
                     94: \EG :: Get the absolute value of @var{num}.
                     95: @item dexp(@var{num})
                     96: \JP :: $BH!?tCM(B exp(@var{num}) $B$r5a$a$k(B.
                     97: \EG :: Get the value of expornent of @var{num}.
                     98: @item dlog(@var{num})
                     99: \JP :: $BBP?tCM(B log(@var{num}) $B$r5a$a$k(B.
                    100: \EG :: Get the value of logarithm of @var{num}.
                    101: @item dsqrt(@var{num})
                    102: \JP :: $BJ?9T:,(B sqrt(@var{num}) $B$r5a$a$k(B.
                    103: \EG :: Get the value of square root of @var{num}.
                    104: @end table
                    105:
                    106: @table @var
                    107: @item return
                    108: \JP $BG\@:EYIbF0>.?t(B
                    109: \EG floating point number
                    110: @item num
                    111: \JP $B?t(B
                    112: \EG number
                    113: @end table
                    114:
                    115: @itemize @bullet
                    116: \BJP
                    117: @item
                    118: $B=iEyH!?t$r?tCME*$K7W;;$9$k(B.
                    119: @item
                    120: $B$3$l$i$NH!?t$O(B C $B8@8l$NI8=`?t3X%i%$%V%i%j$rMQ$$$k(B.
                    121: $B$7$?$,$C$F(B, $B7W;;7k2L$O%*%Z%l!<%F%#%s%0%7%9%F%`$H%3%s%Q%$%i$K0MB8$9$k(B.
                    122: @item
1.2     ! ohara     123: @code{dabs()}$B$H(B@code{dsqrt()}$B$r=|$-!"(B
        !           124: $BJ#AG?t$KBP$7$F$O@5$7$/$J$$7k2L$rJV$9$N$GCm0U$7$J$1$l$P$J$i$J$$(B.
        !           125: @item
        !           126: @@pi $B$J$I$N%7%s%\%k$r0z?t$KM?$($k$3$H$O$G$-$J$$(B.
1.1       ohara     127: \E
                    128: \BEG
                    129: @item
                    130: Compute numerical values of elementary functions.
                    131: @item
                    132: These functions use the standard mathematical library of C language.
                    133: So results depend on operating systems and a C compilers.
                    134: \E
                    135: @end itemize
                    136:
                    137: @example
                    138: [0] dexp(1);
                    139: 2.71828
                    140: @end example
                    141:
                    142: \JP @node ceil floor rint dceil dfloor drint,,, $B?tCMH!?t(B
                    143: \EG @node ceil floor rint dceil dfloor drint,,, Numerical functions
                    144: @subsection @code{ceil}, @code{floor}, @code{rint}, @code{dceil}, @code{dfloor}, @code{drint}
                    145: @findex ceil
                    146: @findex floor
                    147: @findex rint
                    148: @findex dceil
                    149: @findex dfloor
                    150: @findex drint
                    151:
                    152: @table @t
                    153: @item ceil(@var{num})
                    154: @item dceil(@var{num})
                    155: \JP :: @var{num} $B$h$jBg$-$$:G>.$N@0?t$r5a$a$k(B.
                    156: \EG :: Get the ceiling integer of @var{num}.
                    157: @item floor(@var{num})
                    158: @item dfloor(@var{num})
                    159: \JP :: @var{num} $B$h$j>.$5$$:GBg$N@0?t$r5a$a$k(B.
                    160: \EG :: Get the floor integer of @var{num}.
                    161: @item rint(@var{num})
                    162: @item drint(@var{num})
                    163: \JP :: @var{num} $B$r@0?t$K$^$k$a$k(B.
                    164: \EG :: Get the round integer of @var{num}.
                    165: @end table
                    166:
                    167: @table @var
                    168: @item return
                    169: \JP $B@0?t(B
                    170: \EG integer
                    171: @item num
                    172: \JP $B?t(B
                    173: \EG number
                    174: @end table
                    175:
                    176: @itemize @bullet
                    177: \BJP
                    178: @item
                    179: @code{dceil}, @code{dfloor}, @code{drint} $B$O(B
                    180: @code{ceil}, @code{floor}, @code{rint} $B$NJLL>$G$"$k(B.
                    181: @item
                    182: $BIbF0>.?t$r@0?t$K$^$k$a$kJ}K!$O(B, $B%*%Z%l!<%F%#%s%0%7%9%F%`$H%3%s%Q%$%i$K0MB8$9$k(B.
                    183: @item
1.2     ! ohara     184: $BJ#AG?t$KBP$7$F$O@5$7$/$J$$7k2L$rJV$9$N$GCm0U$7$J$1$l$P$J$i$J$$(B.
        !           185: @item
        !           186: @@pi $B$J$I$N%7%s%\%k$r0z?t$KM?$($k$3$H$O$G$-$J$$(B.
1.1       ohara     187: \E
                    188: @end itemize
                    189:
                    190: @example
                    191: [0] dceil(1.1);
                    192: 1
                    193: @end example

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