2005-03-27から1日間の記事一覧
二分探索を書いてみた。 import System import Numeric bisearch f e (x,y) | 0 == f x = (x,x) | 0 == f y = (y,y) | delta < e = (x,y) | sf x == sf y = error $ "sign . f x == sign . f y" ++ (show (x,y)) | sf x /= sf c = bisearch f e (x,c) | sf y…