Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-rosetta/blob/main/exercises/square-root/.meta/example.om # omega-rosetta aien-dev/omega-rosetta Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-rosetta / exercises / square-root / .meta / example.om` 18 lines ยท 476 bytes Raw Blame History 1 note Exercism-style exercise "square-root": https://exercism.org/tracks/python/exercises/square-root 2 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 3 note squareroot is the integer square root of n: the largest r with r * r <= n. 4 note Check it with: sh exercise.sh exercises/square-root 5 om2 6 fn squareroot n ulong to ulong 7 lo = ulong 0 8 hi = add div n 2 1 9 while lt lo hi bound 64 10 m = div add add lo hi 1 2 11 if le m div n m 12 lo = m 13 else 14 hi = sub m 1 15 end 16 end 17 ret lo 18 end