Micro-challenge: Special Event
|
12-24-2022, 07:20 PM
Post: #15
|
|||
|
|||
RE: Micro-challenge: Special Event
(12-24-2022 05:50 PM)johnb Wrote: 411/64 = 6.4219, so if this were base 8, the first digit would be 6 ... Algorithm for base digits are the same, if we do least significant digits first. 411 = -51*-8 + 3 -51 = 7*-8 + 5 7 = 0*-8 + 7 We can also do positive base, negate "odd" digits for negative base, then normalize. Below, bar on top signified negative number. \( 411/64 = (6.33)_8 = (6.\bar{3}3)_\bar{8} + (1.8)_\bar{8}= (7.53)_\bar{8}\) Gerald H example, 1953 to base -10 Cas> [0, -1, 9, -5, 3] Cas> Ans + [1, 10, 1, 10] → [1, 9, 10, 5, 3] Cas> Ans - [0, 1, 10] → [1, 8, 0, 5, 3] Cas> horner(Ans, -10) → 1953 // confirmed (18053)-10 = 1953 BTW, radix can be non-integers too. see Weird Number Bases |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)