Post Reply 
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 ...
But this is base -8, and the first digit isn't 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
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Micro-challenge: Special Event - EdS2 - 12-19-2022, 04:05 PM
RE: Micro-challenge: Special Event - johnb - 12-24-2022, 05:43 PM
RE: Micro-challenge: Special Event - EdS2 - 12-23-2022, 07:08 AM
RE: Micro-challenge: Special Event - johnb - 12-24-2022, 05:50 PM
RE: Micro-challenge: Special Event - Albert Chan - 12-24-2022 07:20 PM



User(s) browsing this thread: 1 Guest(s)