Breaking up large numbers in (GNU Emacs) imaxima?



If you have large integer numbers, you should
consider how you are going to use them. For
example, write a program to put the numbers in
an array, and print the elements of the array
one per line.  It might also be useful to print
large numbers along with their log (base 10), to
see the number of digits.

I think that using Maxima's default printing which
is oriented towards applied mathematics expressions
for number theory is ok if it works.  If it doesn't
work for number theory, that's not necessarily a
reason to change the display -- just write an appropriate
output routine for your special needs.

What do you do with an integer that is 2000 characters long?
Can you even tell if it is 2001 or 1999 digits?

RJF


Alasdair McAndrew wrote:

> A large integer is not broken up into several lines unless display2d
> is set to "false".  But it's a pain to keep changing the settings of
> display2d depending on the output.  Is there any way of changing the
> display2d variable depending on the output?  So that, for example if
> integerp(output) returns "true", then display2d is automatically set
> to "false" for that output only?
> 
> Alternatively, is there any way of keeping display2d set to "imaxima"
> but break up large integers?
> 
> Thanks,
> Alasdair
> 
> _______________________________________________
> Maxima mailing list
> Maxima@math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima