23 May
2013
23 May
'13
2:55 p.m.
has a long repeating decimal: In[170]:= RealDigits[100/(254/100)] Out[170]= {{{3, 9, 3, 7, 0, 0, 7, 8, 7, 4, 0, 1, 5, 7, 4, 8, 0, 3, 1, 4, 9, 6, 0, 6, 2, 9, 9, 2, 1, 2, 5, 9, 8, 4, 2, 5, 1, 9, 6, 8, 5, 0}}, 2} I.e. 39.3700... But the binary is very short: In[171]:= RealDigits[100/(254/100), 2] Out[171]= {{1, 0, 0, {1, 1, 1, 0, 1, 0, 1}}, 6} i.e. 100111.0101... Likewise the octal: In[172]:= RealDigits[100/(254/100), 8] Out[172]= {{4, {7, 2, 7, 5, 3, 6, 5}}, 2} Reason: 254 = 2*(2^7 - 1) . --rwg