ASMTest demo source code attached. The d-pad, buttons, and crank can be used to control the distance in different ways. As listed above, the square root is calculated using an assembly routine.
pd->system->formatString(&message, "d=%.3f", fast_sqrt(x*x + y*y));
EDIT: New upload that actually builds and runs on hardware! Files modified to use Simulator ASM that runs on Apple Silicon, but the X86_64 .s file is still in the project.
ASMTest.zip (38.0 KB)