アットウィキロゴ
大久保弘崇
掲示板 掲示板 ページ検索 ページ検索 メニュー メニュー

大久保弘崇

Errata-2

最終更新:

hirotakaohkubo

- view
管理者のみ編集可

Chapter 3


p.16 equation

Wrong:

m^{1.59}
Correct:

m^{1.58}
Since

\frac{1}{\log_3 2} = 1.5849625007211561814537389439478\cdots

p.17 l.17

Wrong:
Thus A(m,n) =
Correct:
Thus log A(m,n) =

p.18 Fig 3.1

2 condition
Wrong:

\textbf{if} \, f(p,q) = z
Correct:

\textbf{if} \, f(p,q) == z

Chapter 4


p.23 and p.24

Wrong:
{using (4.1) again}
Correct:
{using (4.2)}

p.25 Fig4.1 and definition of smallest

KC's code :
smallest :: Ord a => Int -> (Array Int a, Array Int a) -> a

search k (lx, rx) (ly, ry)
  | lx == rx = ya ! (k+ly)
  | ly == ry = xa ! (k+lx)
  | otherwise = case (xa ! mx < ya ! my, k <= mx-lx+my-ly) of
      (True, True) -> search k (lx,rx) (ly,my)
      (True, False) -> search (k-(mx-lx)-1) (mx+1,rx) (ly,ry)
      (False, True) -> search k (lx,mx) (ly,ry)
      (False, False)-> search (k-(my-ly)-1) (lx,rx) (my+1,ry)
  where mx = (lx+rx) `div` 2
        my = (ly+ry) `div` 2

Place comment here

Name
Message
記事メニュー
最近更新されたスレッド
ウィキ募集バナー