# Barnes-Hut algorithm and recursion limit

If while distributing particles to their corresponding nodes, two particles comes closer to a level smaller than the machine precision (or $\Delta d \to 0$), how is the situation to be treated? Should the recursive distribution stop and both of them be added to a single node?

This happens because of treating particles as point objects rather than 2D objects. Imagine a machine having a precision level of 3 decimal points (mm in SI) and a situation in which the bodies come within $10^{-6}$ (micro level) of one another.

• This doesn't look like a research level question in theoretical computer science?mass such! it is off-topic here, if you comment or flag then I can migrate it to CS.SE where it would be on topic. – Artem Kaznatcheev Mar 1 '14 at 19:52
• @ArtemKaznatcheev This is at best marginal on Computer Science, as it's about numeric computation with direct relevance to physics. Computational Science would be a better place, I've flagged to migrate there instead. – Gilles 'SO- stop being evil' Mar 2 '14 at 19:04

r=sqrt((bx-px)^2+(by-py)^2+epsilon)