This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| cubloc:sqr:index [2026/02/20 05:11] – admin | cubloc:sqr:index [2026/02/20 15:37] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Sqr ====== | ====== Sqr ====== | ||
| - | The Sqr function returns the square root of a numeric value. | + | The **Sqr** function returns the square root ($\sqrt{x}$) of a numeric |
| - | The square root of a number | + | |
| - | + | For the best precision, use the '' | |
| - | + | ||
| - | [Image of square root function graph] | + | |
| - | + | ||
| - | + | ||
| - | On the Cubloc platform, the Sqr function is optimized for efficiency. To maintain the highest degree of precision, | + | |
| - | + | ||
| - | Sqr accepts any non-negative | + | |
| Example | Example | ||
| Line 22: | Line 14: | ||
| ==== Explanation: | ==== Explanation: | ||
| + | * **B**: A non-negative number. | ||
| + | * **Sqr B**: Calculates the square root. | ||
| + | * **A**: Stores the result. | ||
| - | * **B** should contain a non-negative numeric value. | + | **Usage Tip (Distance):** |
| - | * **Sqr B** calculates the principal square root of that value. | + | To find the distance between two points $(x1, y1)$ and $(x2, y2)$: |
| - | * The resulting value—commonly used in calculating the magnitude of vectors or normalizing sensor data—is stored in **A**. | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | [Image of Pythagorean theorem formula] | + | |
| - | + | ||
| - | + | ||
| - | **Usage Tip: | + | |
| '' | '' | ||
| [[cubloc: | [[cubloc: | ||