Re: [colorforth] Euler Project Problems.
- Subject: Re: [colorforth] Euler Project Problems.
- From: Gwenhwyfaer <gwenhwyfaer@xxxxxxxxx>
- Date: Sat, 10 May 2008 21:35:03 +0100
On 10/05/2008, Albert van der Horst <albert@xxxxxxxxxxxxxxxxxx> wrote:
> On Fri, May 09, 2008 at 04:38:47PM -0600, Ray St. Marie wrote:
> > I've spent a day trying to figure out how I will implement larger then
> > 32 bit ( 27 really) numbers in colorforth for Project Euler Problem 3.
> >
> > Find the Greatest Prime Factor of 600851475143.
> There is a division operator that spans 2 registers, effectively
> doing the SM/REM action of ISO Forth in one instruction.
> That is 64 by 32 bit division.
> It is called IDIV
Unfortunately, it only returns 32-bit (31-bit, if signed) results -
which means that determining whether 3 is a factor of the above number
will necessitate a true double-precision division (64/32 returning
64).
Regards
Gwenhwyfaer
---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com