Project

General

Profile

Feature #1718

FactorINT with time-out

Added by John Abbott over 1 year ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Renaming
Target version:
Start date:
16 Dec 2022
Due date:
% Done:

100%

Estimated time:
4.10 h
Spent time:

Description

I have found it useful to be able to impose a time-out on FactorINT calls.
I already have a first impl which seems to pass some basic tests.

What should the fn be called? The prototype is FactorINT_TimeOut

I note that we already have GBasisTimeout: no underscore, and "o" is small.
We also already have FactorINT_TrialDiv and FactorINT_PollardRho.
So there is some inconsistency in fn naming!


Related issues

Related to CoCoALib - Bug #1719: FactorINT has got worseClosed2022-12-18

History

#1 Updated by John Abbott over 1 year ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

My first thought was to let FactorINT accept an optional second arg: this is more-or-less what the CoCoALib impl does.

For a prototype it seemed simpler to introduce a new fn; and I think it is clearer to read FactorINT_TimeOut(N,20)
rather than FactorINT(N,20).

Comments? Opinions? Suggestions?

#2 Updated by John Abbott over 1 year ago

  • Related to Bug #1719: FactorINT has got worse added

#3 Updated by John Abbott over 1 year ago

  • Status changed from In Progress to Resolved
  • Assignee set to John Abbott
  • % Done changed from 10 to 80

Implemented (but see also issue #1719).
Remaining question: fn name, currently FactorINT_TimeOut (see discussion in main descr)

#4 Updated by John Abbott about 1 year ago

  • Status changed from Resolved to Feedback
  • % Done changed from 80 to 90

No one objected to FactorINT_TimeOut.
I wonder if GBasisTimeout should be renamed to GBasis_TimeOut -- what do you think?

#5 Updated by John Abbott about 1 year ago

I think I prefer with the underscore... not entirely sure why.
Should I change GBasisTimeout to GBasis_TimeOut?

#6 Updated by Anna Maria Bigatti about 1 year ago

John Abbott wrote:

I think I prefer with the underscore... not entirely sure why.
Should I change GBasisTimeout to GBasis_TimeOut?

I agree. But make it obsolescent (not just rename it)

#7 Updated by John Abbott about 1 year ago

Do you prefer GBasis_TimeOut or GBasis_Timeout?
(and then analogously for FactorINT_TimeOut)

#8 Updated by John Abbott 4 months ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100
  • Estimated time set to 4.10 h
I have decided to disable FactorINT_timeout because
  • FactorINT now auto times-out after about 20s (since it is very unlikely that more factors will be found in a reasonable amount of extra time)
  • I cannot really think of any good use-case for FactorINT_timeout in CoCoA-5
  • anyone who wants to factorize "tough" integers should use some other software -- it's not CoCoA's forte!

The question about the suffix remains. Are fn names with underscores handled correctly in the documentation (esp. LaTeX)?

Also available in: Atom PDF