🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.comp.theory
Article #21

表引き乗算

#21
From: やねのすずめ
Date: Fri, 16 Feb 2007 13:45
30 lines
2092 bytes
よく知られているとは思いますが、

 x・y

  x+y 2  x-y 2
=(―――) -(―――)
   2      2

と変形すると、

      2
 n → n

の表引きで乗算ができますね
(不幸にも x±y が奇数の場合は、
 y’=y-1 とおいて
 x・y’+x を計算する)。

8ビットどうしの乗算では、
テーブルサイズが512バイト(オクテット)なので、
乗算命令のないマイコンでは有用かもしれません。

# 中学(高校?)の数学が役立つ興味深い例ですね。


-- 
 (^v^) (.. )(o^<  >^o)
 (( ))//^ ))(( ))(( ))
= //林 //林  //林 //林 ================================^
            midoli@mtg.biglobe.ne.jp  やねのすずめ  //  \
Technical Details
Message-ID: <er4cf6$oqq$1@caraway.media.kyoto-u.ac.jp>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!out01a.usenetserver.com!news.usenetserver.com!in04.usenetserver.com!news.usenetserver.com!newsfeed.media.kyoto-u.ac.jp!news.media.kyoto-u.ac.jp!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10a0b6,fbdeefae65bb6df1,start
X-Google-Attributes: gid10a0b6,public
X-Google-Language: Japanese,JIS
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!out01a.usenetserver.com!news.usenetserver.com!in04.usenetserver.com!news.usenetserver.com!newsfeed.media.kyoto-u.ac.jp!news.media.kyoto-u.ac.jp!not-for-mail
From: やねのすずめ <midoli@mtg.biglobe.ne.jp>
Newsgroups: fj.comp.theory
Subject: 表引き乗算
Date: Fri, 16 Feb 2007 22:45:57 +0900
Organization: Public NNTP Service, Kyoto University, JAPAN
Lines: 30
Sender: midoli@mtg.biglobe.ne.jp
Message-ID: <er4cf6$oqq$1@caraway.media.kyoto-u.ac.jp>
NNTP-Posting-Host: acca1aag140.aic.mesh.ad.jp
Mime-Version: 1.0
Content-Type: text/plain;
 charset="iso-2022-jp"
Content-Transfer-Encoding: 7bit
X-Trace: caraway.media.kyoto-u.ac.jp 1171633446 25434 133.205.126.140 (16 Feb 2007 13:44:06 GMT)
X-Complaints-To: news@news.media.kyoto-u.ac.jp
NNTP-Posting-Date: Fri, 16 Feb 2007 13:44:06 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441