Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #10672

Re: Euler problem 303

Newsgroups comp.lang.forth
From Albert van der Horst <albert@spenarnc.xs4all.nl>
Subject Re: Euler problem 303
Date 2012-03-31 18:27 +0000
Message-ID <m1rhyb.bb8@spenarnc.xs4all.nl> (permalink)
Organization Dutch Forth Workshop
References <2012Mar30.170245@mips.complang.tuwien.ac.at> <m1qz5u.571@spenarnc.xs4all.nl> <2012Mar31.153037@mips.complang.tuwien.ac.at>

Show all headers | View raw


In article <2012Mar31.153037@mips.complang.tuwien.ac.at>,
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>Albert van der Horst <albert@spenarnc.xs4all.nl> writes:
>>In article <2012Mar30.170245@mips.complang.tuwien.ac.at>,
>>Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>>>Project Euler has lifted the thread length limit, so I did another
>>>problem:
>>>
>>><http://projecteuler.net/problem=303>
>>
<SNIP>
>
>> I don't remember overflow much to this particular
>>problem, though.
>
>No, you used a completely different approach.  However, given that
>f(9999) does not fit in 64 bits, a straightforward solution will have
>that problem.

I looked again into the problem.
My solution indeed handles 9999 as a special case too.
And it takes about 30 seconds on gforth.

>
>- anton
>--
>M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
>comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
>     New standard: http://www.forth200x.org/forth200x.html
>   EuroForth 2011: http://www.euroforth.org/ef11/


--
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Back to comp.lang.forth | Previous | NextPrevious in thread | Find similar


Thread

Euler problem 303 anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-30 15:02 +0000
  Re: Euler problem 303 Paul Rubin <no.email@nospam.invalid> - 2012-03-30 22:30 -0700
    Re: Euler problem 303 anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-31 13:08 +0000
      Re: Euler problem 303 Paul Rubin <no.email@nospam.invalid> - 2012-04-01 00:51 -0700
        Re: Euler problem 303 Paul Rubin <no.email@nospam.invalid> - 2012-04-01 01:46 -0700
          Re: Euler problem 303 mhx@iae.nl (Marcel Hendrix) - 2012-04-01 12:00 +0200
            Re: Euler problem 303 Paul Rubin <no.email@nospam.invalid> - 2012-04-01 12:57 -0700
              Re: Euler problem 303 Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-04-01 23:34 +0000
                Re: Euler problem 303 Paul Rubin <no.email@nospam.invalid> - 2012-04-01 17:19 -0700
          Re: Euler problem 303 anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-04-02 10:53 +0000
  Re: Euler problem 303 Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-03-31 11:41 +0000
    Re: Euler problem 303 anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-31 13:30 +0000
      Re: Euler problem 303 Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-03-31 18:27 +0000

csiph-web