Divs Problem [FIXED IN v1.4]

Bugs in ND1 (report'em, get'em fixed)

Divs Problem [FIXED IN v1.4]

Postby OrderEng » Fri Jun 17, 2011 12:29 am

If you Sant to find all Factory of 15241579244017681  big
The result is not 123456791 and 1
Posts: 2
Joined: Fri Jun 17, 2011 12:18 am

Re: Divs Problem

Postby oliver » Fri Jun 17, 2011 7:51 am


Thanks for reporting.

The functions divs, factor, and factors are currently not implemented for BigInts, but only for integer Reals.
The Real version is used for these and BigInts become demoted to Reals. That works as long as the BigInt can be represented as Real.
In the case of your number, this is not the case, so the function fails to operate correctly.

These three functions are important and I try to have this correctly implemented for BigInts with the next update.

The other functions in the Integer menu (and others in the Base menu) are implemented for BigInts.

Site Admin
Posts: 433
Joined: Sat May 01, 2010 2:11 pm

Re: Divs Problem [FIXED IN v1.4]

Postby oliver » Mon Jan 02, 2012 2:23 pm

Hi OrderEng,

The functions have been implemented for BigInts in v1.4.

Your test case, 15241579244017681, is a worst case scenario for factoring, as the number is only a product of two primes (it has no other divisors).

I put special case code into my implementation of divs to deal with this case. Thus, 15241579244017681 divs will return the correct result almost instantaneously. However, factor and factors don't have that special case treatment yet. They take a really long time to factor this number (maybe an hour!). I guess this is pushing the limits of a mobile implementation.

Other numbers, with more divisors, factor much more quickly, but BigInts don't factor anywhere as quickly as smaller reals.
I'm working on the CAS, and there's going to be a new avenue for factoring huge numbers more quickly.


Site Admin
Posts: 433
Joined: Sat May 01, 2010 2:11 pm

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest