Closest-pair problem: Difference between revisions
m
BASIC 256 and BBC BASIC moved to the BASIC section.
No edit summary |
m (BASIC 256 and BBC BASIC moved to the BASIC section.) |
||
Line 392:
distance between (0.891663,0.888594) and (0.925092,0.818220) is 0.0779102
</pre>
=={{header|BASIC256}}==▼
▲==={{header|BASIC256}}===
'''Versión de fuerza bruta:
<syntaxhighlight lang="basic256">
Line 414 ⟶ 416:
El par más cercano es 2 y 5 a una distancia de 0,077910191355
</pre>
▲=={{header|BBC BASIC}}==
==={{header|BBC BASIC}}===
To find the closest pair it is sufficient to compare the squared-distances,
it is not necessary to perform the square root for each pair!
|