# Re: atomic

From: paul c <toledobythesea_at_ooyah.ac>
Date: Thu, 01 Nov 2007 16:09:43 GMT
Message-ID: <bTmWi.165151\$Da.50368_at_pd7urf1no>

> David Cressey wrote:

```>> "Bob Badour" <bbadour_at_pei.sympatico.ca> wrote in message
>> news:4728f759\$0\$14832\$9a566e8b_at_news.aliant.net...
>>
>>> It's ironic you should mention base 9. It's a little-known fact that, if
>>> a number is evenly divisible by 8, the sum of the digits of the number
>>> in base 9 is also evenly divisible by 8. And if one repeats the process
>>> with that sum until the resulting sum has only one digit and if the
>>> original number was divisible by 8, the one remaining digit will be 8.
>>>
>>> It's like magic. So it's really ironic you should mention base 9 in
>>> particular.
>>
>> This is a joke,  right?  For radix n,  n-1 has this interesting property.
```

>
> Shhhhh! You've ruined it! Now nobody will bother converting numbers to
> base 9 to see if it actually works. Spoilsport!
>
>
```>> Likewise,  9 has this fun property in decimals.  Bookkeepers in the Bob
>> Chratchit era used a property much like this one for error detection in
>> manually managed numbers.
>>
>> If this were another person posting,  I'd think it was simple oversight.
>> But you,  BB, are likely to know exactly what I've just said.
```

>
> If the number is divisible by any factor of n-1, the sum of the digits
> will be a multiple of that factor too. Thus, if one repeatedly sums the
> digits of a hexadecimal number, one can tell very quickly whether the
> number is divisible by 3, 5 or F.
>
> Base 9 is actually a little less useful because it can only tell you if
> the number is divisible by 2, 4 or 8, and these are often relatively
> obvious in other bases in any case.

Heh, personally, I prefer to think of all the numbers in my db as base 10**64 or so with a floating decimal, even if there isn't a dbms that supports that. Helps keep me from getting confused by more intricate representations. Received on Thu Nov 01 2007 - 17:09:43 CET

Original text of this message