Hi William,
for instance when I want to factorize
R_c=144763933371168295360588806517031343810867811420949837921127754871142510638597993151140758238582970883311740185886224693481724200740771649359046662103894016000000000000000

I get the message :
  ***   Warning: MPQS: number too big to be factored with MPQS,
        giving up.
/cvos/shared/apps/sage-4.4.4/local/bin/sage-sage: line 356:  8866
Terminated              python "$@"

Also, for other integers R_c, it take too much time (time to fix...
for instance 10 hours) and maybe it would be faster to look at R_{c
+1}....

Another question : is it the good list to post this kind of question?
I saw that there is another list : sage-users... Would it be more
appropriate to post there?
(Another question : I made a double inscription so I receive the
messages also on my other address : [email protected]
bpclermont.fr How can I delete this?)

thank you very much and sorry if I ask something stupid : I am a
beginner in sage...

Marusia


On 16 juil, 15:13, William Stein <[email protected]> wrote:
> On Fri, Jul 16, 2010 at 2:35 PM, m.rebolledo
>
> <[email protected]> wrote:
> > thank you but the solution that you proposed seem to tell "abort if
> > the process is too long" and I would like to do something like "while
> > R_c is too long to factorized, do c:=c+1".
> > is it possible with @fork?
>
> What is the definition of "too long to factorize"?
>
>
>
>
>
>
>
> > sorry if it is obvious ...
>
> > On 16 juil, 12:40, "Dr. David Kirkby" <[email protected]> wrote:
> >> On 07/16/10 11:32 AM, William Stein wrote:
>
> >> > On Thu, Jul 15, 2010 at 10:36 AM, troublion<[email protected]> 
> >> >  wrote:
> >> >> hello,
>
> >> >> within a procedure I need to factorize an integer R_c depending on a
> >> >> parameter c which I can change if I want. But this integer can be very
> >> >> big (like 170 digits or more...) so sage could not factorize it. I
> >> >> would like to say to sage something like "if you can, factorize it,
> >> >> else look at R_{c+1}".
> >> >> Is it possible? How?
> >> >> thank you very much in advance,
>
> >> > My new @fork decorator is perfect for this, which you get from
> >> >http://trac.sagemath.org/sage_trac/ticket/9501, or wait for sage-4.5.1
> >> > (in 2-3 weeks).
>
> >> > Code:
>
> >> > @fork(timeout=1)
> >> > def fac1(n):
> >> >      return factor(n)
>
> >> > Usage:
>
> >> > sage: fac1(2903482093840982)
> >> > 2 * 15907 * 26203 * 3482971
> >> > sage: fac1(2^97+1)
> >> > 3 * 971 * 1553 * 31817 * 1100876018364883721
> >> > sage: fac1(2^997+1)
> >> > Killing subprocess 94648 with input
> >> > ((1339385758982834151185531311325002263201756014631917009304687985462938813
> >> >  
> >> > 906170153116497973519619822659493341146941433531483931607115392554498072196
> >> >  
> >> > 837321850491820971853028873177634325632796392734744272769130809372947742658
> >> >  
> >> > 424845944895692993259632864321399559710817770957553728956578048354650708508
> >> >  673,),
> >> > {}) which took too long
> >> > 'NO DATA (timed out)'
>
> >> Mathematica has two related to this
>
> >>http://reference.wolfram.com/mathematica/ref/TimeConstrained.htmlhttp...
>
> >> It might be useful if Sage could implement the latter too.
>
> >> Dave
>
> > --
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to 
> > [email protected]
> > For more options, visit this group 
> > athttp://groups.google.com/group/sage-support
> > URL:http://www.sagemath.org
>
> --
> William Stein
> Professor of Mathematics
> University of Washingtonhttp://wstein.org

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to