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]=sum[1|0>phase p*phase(p/z(a-g)(b-h)*z(c-g)(d-h))]where p=z(a-e)(b-f)/z(c-e)(d-f);z=(:+)

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

download

return to the top page