Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: The hardest...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 17 of 23 Topic 4031 of 4173
Post > Topic >>

Re: The hardest Euler problem

by William James <w_a_x_man@[EMAIL PROTECTED] > May 5, 2008 at 10:22 AM

On May 4, 2:13 am, m...@[EMAIL PROTECTED]
 (Marcel Hendrix) wrote:
> cac <c...@[EMAIL PROTECTED]
> writes Re: The hardest Euler problem
> [..]
>
> >> Someone posted this PARI/GP solution to problem 12:
> >> n=0; until(numdiv(n*(n+1)/2) > 500, n++); n*(n+1)/2
> >> He said it took about 50ms on his Intel 2.52GHz.
>
> What else to expect with a built-in number-of-divisors function?

What else?  We expect the Forth version to live up to
Jeff Fox's boast that rewriting a program in Forth
makes it 100 times smaller and 1000 times faster.

>
> > Sigh. My solution takes 1h45m. I think maybe PARI/GP knows things
about
> > factoring that I don't.
>
> What you can easily see is that one only needs to count to below the
> square root of u1, because each successful division delivers you two
> valid divisors. If you take that into account, you solve the problem
> in 800 ms

If you take more than that into account and use Pascal,
you solve the problem in 109 ms.
 




 23 Posts in Topic:
The hardest Euler problem
Albert van der Horst <  2008-05-02 11:05:34 
Re: The hardest Euler problem
mhx@[EMAIL PROTECTED] (M  2008-05-02 14:18:00 
Re: The hardest Euler problem
Albert van der Horst <  2008-05-02 16:09:01 
Re: The hardest Euler problem
cac <cac@[EMAIL PROTEC  2008-05-02 07:40:21 
Re: The hardest Euler problem
William James <w_a_x_m  2008-05-03 17:06:22 
Re: The hardest Euler problem
cac <cac@[EMAIL PROTEC  2008-05-03 21:36:56 
Re: The hardest Euler problem
cac <cac@[EMAIL PROTEC  2008-05-03 22:27:03 
Re: The hardest Euler problem
mhx@[EMAIL PROTECTED] (M  2008-05-04 09:13:22 
Re: The hardest Euler problem
cac <cac@[EMAIL PROTEC  2008-05-04 01:31:32 
Re: The hardest Euler problem
mhx@[EMAIL PROTECTED] (M  2008-05-04 13:08:37 
Re: The hardest Euler problem
cac <cac@[EMAIL PROTEC  2008-05-04 19:00:19 
Re: The hardest Euler problem
mhx@[EMAIL PROTECTED] (M  2008-05-04 15:41:04 
Re: The hardest Euler problem
anton@[EMAIL PROTECTED]   2008-05-04 13:47:12 
Re: The hardest Euler problem
William James <w_a_x_m  2008-05-05 08:08:17 
Re: The hardest Euler problem
Jonah Thomas <jethomas  2008-05-04 22:51:46 
Re: The hardest Euler problem
cac <cac@[EMAIL PROTEC  2008-05-04 20:44:33 
Re: The hardest Euler problem
William James <w_a_x_m  2008-05-05 10:22:58 
Re: The hardest Euler problem
anton@[EMAIL PROTECTED]   2008-05-05 17:49:46 
Re: The hardest Euler problem
Alex McDonald <blog@[E  2008-05-15 05:20:01 
Re: The hardest Euler problem
Alex McDonald <blog@[E  2008-05-15 06:47:58 
Re: The hardest Euler problem
foxchip <fox@[EMAIL PR  2008-05-23 17:08:24 
Re: The hardest Euler problem
GiulioDeVecchi@[EMAIL PRO  2008-05-15 00:56:07 
Re: The hardest Euler problem
Albert van der Horst <  2008-05-05 00:01:12 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 22:29:57 CDT 2008.