Re: Make ->Q hang for 10 minutes



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-

.



Relevant Pages

  • Re: help with radical expressions
    ... > in high school and College Algebra, but they went over it so quickly I ... the denominator, ... I see occurs in both terms in the numerator ... So I pull out a fraction that has ...
    (sci.math)
  • Re: Letter to the Editor: The truth of ID is self-evident
    ... The numerator and denominator of a fraction can be any ... And yes, 7 does divide 22. ...
    (talk.origins)
  • Re: reducing large fractions
    ... > Factor the numerator and denominator and cancel common factors. ... so you cannot reduce the fraction. ...
    (sci.math)
  • Re: Cannot find the divison bar on EE
    ... The horizontal line that separates the numerator and denominator of a ... "shilling" fraction? ...
    (microsoft.public.word.docmanagement)
  • Re: DecimalToFraction Algorithm
    ... >> I recently requested an alg to convert a decimal to fraction. ... >> I found a paper with some delphi code and converted it to ... numerator = Round(myValue * denominator) ...
    (comp.lang.basic.realbasic)