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/all-your-base/all-your-base.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 / all-your-base / all-your-base.om` 11 lines ยท 613 bytes Raw Blame History 1 note Exercism-style exercise "all-your-base": https://exercism.org/tracks/python/exercises/all-your-base 2 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 3 note rebase converts the number whose digits ds are in base ib (most significant first) to base ob, 4 note writes its digits into o and returns how many (the number 0 is the single digit 0); or -1 when 5 note ib < 2, -3 when ob < 2, -2 when a digit is outside 0 .. ib-1. 6 note Check it with: sh exercise.sh exercises/all-your-base 7 om2 8 fn rebase ib long ds view long * ob long o edit long * to long 9 note replace this line with your solution 10 trap 13 11 end