On Sun, 8 Nov 2026 05:12:38 -0800, Lars Poulsen wrote:
> After 60 years of programming, I did not know it was in the library. I > always just did > h = sqrt(x*x+y*y); > but if he did not use -lm, did he do his own sqrt() too? And was this on > a machine without hardware floating point?
I can't remember exactly what the problem was but he made an assumption that didn't require finding a hypotenuse. It worked well enough that nobody noticed. iirc it had to do with alerts. The clients could add specific points to the system, a hazardous storage location, for example and set a radius for the trigger. If an incident was reported at point A, any of the alerts within N feet should pop up. The client reported an alert was within the configured N feet but didn't show up and provided a screen shot of a map in Arc Desktop. It was very close but no cigar. As I think about it I believe the simplification was creating a bounding box rather than a circle with the radius of N to avoid doing the math.