11 | ||| Extract the `n` most significant digits from a
12 | ||| non-negative integer plus the exponent representing
13 | ||| the remaining digits.
14 | |||
15 | ||| For example, for `v = 123456789` and `n = 3`, this
16 | ||| would return `(123,5)`, so that `v ~ 123 * 10^5`.
17 | export
24 | -- This just keeps dividing the remainder by 10
25 | -- until it drops below the number of desired digits.
26 | -- The complexity comes from the totality proof, which
27 | -- is definitely overkill here but still oddly satisfying.
28 | where