Included in Circle by I., S.

import Complex
m@main=getLine>>=print.i.map read.words>>m
i[a,b,c,d,e,f,g,h]=j[a:+b,c:+d,e:+f,g:+h]
j[s,t,u,v]=sum[1|0>y p*y(p/(s-v)*(t-v))]where y=imagPart;p=(s-u)/(t-u)

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page