[Numpy-discussion] floating point arithmetic issue

Christopher Barker Chris.Barker@noaa....
Fri Jul 30 11:15:08 CDT 2010

Guillaume Chérel wrote:
> As for the details about my problem, I'm trying to compute the total 
> surface of overlapping disks. I approximate the surface with a grid and 
> count how many points of the grid fall into at least one disk.

That is a highly approximate way to do it - which may be fine, but  I 
doubt any floating point errors you get are going to make it worse.

 > if you
> know of another good way to compute the surface of overlapping disks, 
> I'd be glad to know.

Are these "disks" exactly round? If so -- use coordinate geometry to 
calculate it exactly (or as exactly as floating point allows ;-) )

I just googled: "area of intersecting circles"

And got a bunch of hits.


Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception


More information about the NumPy-Discussion mailing list