Plans regarding helper functions with numbertheoretical character.
More...
Go to the source code of this file.
Detailed Description
Plans regarding helper functions with numbertheoretical character.
 Todo:
 Floors of logarithms

Currently we have fld, which is a special case of floorlog, can only handle integers, and which is also slower, but which can handle arguments of arbitrary size.

Should "floorlog" be changed to "flog"?

floorlog could be made excepting arbitrary large inputs if arbitrary precision would be used  perhaps a case distinction should be performed?

The use of numeric logarithms will always involve a risk of false results, so precise algorithms are sought.
 Todo:
 Positional (polyadic) representations of numbers

Complete the tests.

We duplicated some Maxima functionality (see "ibase" and "obase"), and we should comment on that.

For example that it's quite confusing  if one doesn't know what obase is, it's a bit hard to find out, and to change ibase we need to know its current value!

So one better uses it only locally, but this is also not completely trivial:
(%i6) block([obase : 16], print(16));
10
Evaluation took 0.0000 seconds (0.0004 elapsed) using 1,016 bytes.
(%o6) 16

DONE The whole current system is a bad hack  strings are not appropriate mathematical objects, but lists of integers!

Strings should only result from converting lists of integers.

DONE So all these functions need to be rewritten.

DONE We also need better names than "base_n".

DONE Currently, integer conversion functions don't handle negative numbers.

Example : "int2base_n(10,3);" errors.
Likely this limitation should be removed.

DONE (polyadicstr2int(str,0) equals the rightmost digit) Should base_n2int("SOMETHING",0) = 0 ?
 Todo:
 ext_integer_partitions

That Maxima yields "integer_partitions(0) = {}" is a bug:

DONE Tell the Maxima mailing list, and report the bug.

The documentation states "Thus 0 has no partitions."; this is false (since [] is a partition of 0).

Accordingly, also "integer_partitions(0,0) = {}" is false; it must be {[]}.

Furthermore the documentation states that n can be an integer, but for example "integer_partitions(1) = int_partitions(1)".

We should also correct "integer_partitions(0,0)", but how to overload ext_integer_partitions on the number of arguments?

If the Maxima function would be corrected, then our function ext_integer_partitions shall be eliminated.

See "Document important programming techniques" in ComputerAlgebra/plans/Maxima.hpp.
 Todo:
 Unordered integer partitions

Is there a more direct way of computing unordered integer partitions? (without using integer partitions)?

Given the proposed formula below, it should be possible to convert the subsets of {1,...,n1} into unordered integer partitions.

The Maximafunction permutations is very inefficient for example for lists like create_list(1,i,1,n)  are there better algorithms?

The number of unordered partitions of n seems to be 2^(n1)  is this correct?
Definition in file Auxiliary.hpp.