home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,166 of 4,675   
   aen@nospicedham.spamtrap.com to james.harris.1@nospicedham.gmail.co   
   Re: Palindromic number   
   07 Dec 17 14:58:57   
   
   On Thu, 7 Dec 2017 11:10:56 +0000, James Harris   
    wrote:   
   >>   
   >> This is a 20-digit number so you just take the first 10 digits and   
   >> reverse them in order to get the largest possible 64-bit base-10   
   >> palindrome: 1844674407 7044764481   
   >...   
   >Maybe I misunderstand the requirement but if the palindrome is expected   
   >to fit in 64 bits wouldn't the one you mention be too large (because it   
   >is followed by a lower digit, 3, in the original? Perhaps the first   
   >part's trailing 7 could be reduced to a 6.   
   >   
   >   1844674406 6044764481   
   >...   
   No, but it was a dumb idea by me to use a palindrome for the example   
   in the first place.   
      
   What I actually wanted to test is which is the highest value in the   
   range 1-2^64-1 that produces a wrong result with that reciprocal, and   
   that palindrome was really the worst example.   
      
   With the 32-bit version of the reciprocal it was easy to find that   
   value.  I just used a loop with an increasing value to do a   
   conventional division and a reciproal mul, and left it when the first   
   mul wasn't the same as the div.   
   --   
   aen   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca