Re: Make ->Q hang for 10 minutes
- From: "Joe Horn" <joehorn@xxxxxxxxxxx>
- Date: 19 Mar 2007 03:53:50 -0700
i would have thought that, even by using an exponential factorisation
algorithm, 10 digits or so would only take a matter of a few seconds at most?
A 10-digit integer DOES take only a few seconds at most. Tough
example:
9998000099 FACTOR --> 99989 * 99991 in less than 3 seconds.
So why, you may ask, does DEG CYLIN (1.,<88.) ->Q take over ten
minutes?
Here's why: it involves the factoring of this 49-digit integer:
1097165073782488700234176721510535008282113632441
Why such a large integer, you may ask? The reason is that the code
for ->Q in polar mode on a complex input includes the following:
Convert the REAL part of the input to a fraction with ->Q.
Call the numerator of that fraction A, and the denominator B.
Convert the COMPLEX part of the input to a fraction with ->Q.
Call the numerator of THAT fraction C, and the denominator D.
Calculate (B*C)^2 + (A*D)^2
Take the square root of that possibly huge integer.
It's that last step that takes so long. If the square root weren't
simplified, DEG CYLIN (1.,<88.) ->Q would take less than 2 seconds.
-Joe-
.
- Follow-Ups:
- Re: Make ->Q hang for 10 minutes
- From: hugh
- Re: Make ->Q hang for 10 minutes
- References:
- Make ->Q hang for 10 minutes
- From: Joe Horn
- Re: Make ->Q hang for 10 minutes
- From: Joe Horn
- Re: Make ->Q hang for 10 minutes
- From: hugh
- Make ->Q hang for 10 minutes
- Prev by Date: Re: Question about memory and Garbage Collection, usage of SAUV_REGISTR and MOVERSU
- Next by Date: Re: Question about memory and Garbage Collection, usage of SAUV_REGISTR and MOVERSU
- Previous by thread: Re: Make ->Q hang for 10 minutes
- Next by thread: Re: Make ->Q hang for 10 minutes
- Index(es):
Relevant Pages
|