【作ってみた】√【二分法】 def sqrtb(x,l,h) var m=(l+h)/2 if abs(h-l)<1e-15 then return m if m*m>=x then return sqrtb(x,l,m) else return sqrtb(x,m,h) end def sqrt(x) var r=1,xx=x*x if x<=0 then return 0 while r*r<xx:r=r*2:wend return sqrtb(x,0,r) end ? sqr(2), sqrt(2)