Newsgroups: fj.comp.texhax
Path: galaxy.trc.rwcp.or.jp!jaist-news!cs.titech!nirvana.cs.titech!wnoc-tyo-news!waseda-mail!wsdnws!musashi-tech!ops!uainoue
From: uainoue@ipc.musashi-tech.ac.jp (INOUE Koichi)
Subject: Re: [asobi no TeX] numbersty.sty (Re: sum of money)
In-Reply-To: y-nisikw@kuee.kyoto-u.ac.jp's message of Fri, 28 Jan 1994 09:02:41 GMT
Message-ID: <UAINOUE.94Jan31151400@jupost.ipc.musashi-tech.ac.jp>
Lines: 67
Sender: usenet@musashi-tech.ac.jp
Nntp-Posting-Host: jupost
Organization: Musashi Institute of Technology
References: <MORINAKA.94Jan18114510@hochspits.hip.atr.co.jp>
	<1490@sagagw.cc.saga-u.ac.jp>
	<TSATO.94Jan20180815@ibuki.kuee.kyoto-u.ac.jp>
	<UAINOUE.94Jan27170304@jupost.ipc.musashi-tech.ac.jp>
	<Y-NISIKW.94Jan28180236@lotus.kuee.kyoto-u.ac.jp>
Distribution: fj
Date: Mon, 31 Jan 1994 06:14:00 GMT
Xref: galaxy.trc.rwcp.or.jp fj.comp.texhax:4530
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.comp.texhax&nb=4530&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

$B$$$N$&$($G$9!#(B

$B!t$4$a$s$J$5$$(B

In article <Y-NISIKW.94Jan28180236@lotus.kuee.kyoto-u.ac.jp> y-nisikw@kuee.kyoto-u.ac.jp (Yoshikiyo NISHIKAWA) writes:
>        \milnumber1234 -> 1,234 ($B$3$l$O@5$7$$(B)        
>        \milnumber1000 -> 1,0
>        \milnumber1020 -> 1,20
>        \milnumber1100 -> 1,100 ($B$3$l$O@5$7$$(B)
>        \milnumber1001 -> 1,1
>        \milnumber1001234 -> 1,1,234
>        \milnumber1000000 -> 1,0,0
>$B$N$h$&$K$J$j$^$7$?!%(B
>$B$I$&$d$i%3%s%^$ND>8e$,(B0$B$N>l9g!$$=$N(B0$B$*$h$S$=$l$KB3$/(B0$B$,=P$J$$$h$&$G$9!%(B
>(1,000,000$B$N$h$&$K!$%3%s%^$ND>8e$+$i(B0$B$,#3$DB3$/;~$K$O(B
>$B:G8e$N!$$D$^$j%3%s%^$ND>A0$K$J$k(B0$B$O=P$k$h$&$G$9$,!%(B)
>
>$B$=$N860x$O2?$G$7$g$&$+!)(B

$B$($($+$2$s$G$7$?!#$D$$$G$K!"(B2^31$B$"$?$j!"#1#12/1_$0$i$$$G07$($J$/$J$j$^$9!#(B
$B$1$IMxE@$O!"!V?tCM$KBP$7$F;H$($k!W$G$7$g$&$+$M!#(B\hexnumber\count0$B$b$$$1(B
$B$k$O$:$G$9!#$b$R$H$D!"Ii$N?tCM$b07$&$h$&$K$7$^$7$?$N$G;H$C$F$_$F2<$5$$!#(B
$B!J$D$$$G$K(B\hondanumber$B$H$$$&$N$b!K(B

-------------------------------------------------------------------------
\newcount\tempcode
\newcount\digit
\def\hexnumber{\afterassignment\writehexnumber\tempcode}
\def\writehexnumber{\ifnum0>\tempcode--\tempcode-\tempcode\fi
\digit-\tempcode
\divide\digit"10
\multiply\digit"10
\advance\digit\tempcode
{\nexthexdigit}\ifcase\digit0\or1\or2\or3\or4\or5\or6\or7\or8\or9
\or A\or B\or C\or D\or E\or F\else X\fi}
\def\nexthexdigit{\divide\tempcode"10
\ifnum0<\tempcode\writehexnumber\fi}
\def\milnumber{\afterassignment\writemilnumber\tempcode}
\def\writemilnumber{\ifnum0>\tempcode--\tempcode-\tempcode\fi
\ifnum1000>\tempcode\number\tempcode
\else\digit-\tempcode
\divide\digit1000
\multiply\digit1000
\advance\digit\tempcode
{\nextmildigit}\ifnum100>\digit\ifnum10>\digit
0\fi0\fi\number\digit
\fi}
\def\nextmildigit{\divide\tempcode1000
\ifnum0<\tempcode\writemilnumber,\fi}
\def\hondanumber{\afterassignment\writehondanumber\tempcode}
\def\writehondanumber{\ifnum0>\tempcode--\tempcode-\tempcode\fi
\ifnum10000>\tempcode\number\tempcode
\else\digit-\tempcode
\divide\digit10000
\multiply\digit10000
\advance\digit\tempcode
{\nexthondadigit}\ifnum1000>\digit\ifnum100>\digit
\ifnum10>\digit 0\fi0\fi0\fi\number\digit\fi}
\def\nexthondadigit{\divide\tempcode10000
\ifnum0<\tempcode\writehondanumber,\fi}
----------------------------------------------------------------------------
--
         $BCg(B        $BCg(B
---$BJbJbJbJbJbJbJbJbJbJbJbJb(B---------------------------------------------
   $B2#C(HtGON6;bK[N6GOHtC(2#(B                                    $B0f>e9@0l(B
   $BH?(B  $B3Q(B  $B8WsJK18W(B  $B3Q(B  $BH?(B     e-mail : uainoue@ipc.musashi-tech.ac.jp
---$B9aI?F<6d6b2&>]6b6dF<I?9a(B--------------$B$=$l$G$b;d$OM}@-$r?.$8$F$$$^$9(B-
