Ask Your Question

Revision history [back]

You can try by replacing range which:

  • produces a list (hence should be first filled with all those numbers, which is impossible anyway)
  • relies on C longs to work (and your number is too large for that)

with xsrange that

  • is an iterator
  • relies on Sage integers

That said, you should understand that there is no hope to exhaust all, or even a reasonable part of those numbers. Even if the computation you are doing ineach loop costs one nanosecond, how long will the total computation be ?

You can try by replacing range which:

  • produces a list (hence should be first filled with all those numbers, which is impossible anyway)
  • relies on C longs to work (and your number is too large for that)

with xsrange that

  • is an iteratoriterator (the x)
  • relies on Sage integersintegers (the s)

That said, you should understand that there is no hope to exhaust all, or even a reasonable part of those numbers. Even if the computation you are doing ineach loop costs one nanosecond, how long will the total computation be ?