home bbs files messages ]

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

   comp.lang.forth      Forth programmers eat a lot of Bratwurst      117,927 messages   

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

   Message 116,451 of 117,927   
   Paul Rubin to Gerry Jackson   
   Re: Best Euler #13 solution?   
   02 May 24 20:54:10   
   
   From: no.email@nospam.invalid   
      
   Gerry Jackson  writes:   
   > I'm no mathematician and don't understand Paul's or  Ron's   
   > solutions. Assuming the phrase 'the first 10 digits" means the 10 most   
   > significant digits of the sum of the 100 numbers I think I would   
      
      
   Wait what, I think I have #13 as the wrong problem?  Yes, I had a saved   
   euler13.fs file that I posted, but it was actually for problem 14.  Not   
   sure how that happened, sorry.   
      
   Yeah for #13, I would just add up the leftmost 14 or so digits of each   
   number as 64-bit ints, then check that the result was not anywhere near   
   causing an overflow in the top 10 digits.  In the unlikely case where   
   that is an issue, use multi-precision.  Or in a language with native   
   bignums, the whole thing becomes trivial.   
      
   --- 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