Return to float.texi CVS log | Up to [local] / OpenXM / src / asir-doc / int-parts / datatype |
File: [local] / OpenXM / src / asir-doc / int-parts / datatype / float.texi (download)
Revision 1.1, Mon Apr 23 05:45:36 2001 UTC (23 years, 4 months ago) by noro
Risa/Asir manual on the internal specifications. |
@comment $OpenXM: OpenXM/src/asir-doc/int-parts/datatype/float.texi,v 1.1 2001/04/23 05:45:36 noro Exp $ @section $BG\@:EYIbF0>.?t(B @example struct oReal @{ $BG\@:EYIbF0>.?t(B short id; $B<1JL;R(B (= O_N) char nid; $B?t<1JL;R(B (= N_R) char pad; double body; $BG\@:EYIbF0>.?t(B @}; typedef struct oReal *Real; @end example @subsection $BG\@:EYIbF0>.?t$N@8@.(B, $BJQ49(B @example #include "ca.h" MKReal(a,b) (macro; double a; Real b) body $B$,(B a $B$G$"$kG\@:EYIbF0>.?t(B b $B$r@8@.$9$k(B. double RatnToReal(Q a) $BM-M}?t(B a $B$rG\@:EYIbF0>.?t$KJQ49$9$k(B. @end example @noindent $B%^%/%m$GI,MW$JNN0h$O%^%/%mFb$G3NJ]$5$l$k(B. @subsection $B;MB'(B @noindent $B$$$:$l$b(B, $BIbF0>.?t(B, $BM-M}?tN>J}$rF~NO$K$H$l$k(B. $B7k2L$O$9$Y$FIbF0>.?t$H$J$k(B. @example #include "ca.h" addreal(Num a,Num b,Real *rp) *rp = a + b subreal(Num a,Num b,Real *rp) *rp = a - b mulreal(Num a,Num b,Real *rp) *rp = a * b divreal(Num a,Num b,Real *rp) *rp = a / b pwrreal(Num a,Num e,Real *rp) *rp = a ^ e int cmpreal(Num a,Num b) sgn(a-b) @end example