in reply to Re: Out of memory.
in thread Out of memory.

I believe the equation got truncated. Precision isn't an issue since it is a symbolic manipulation. The numbers represent variables (lines in an excel file) and are not actual numbers. Is there a package that handled symbolic algebra. I basically need to multiply these variables through in order to get a list of independent vars. For example: (a+b)*(c+d) or ab+cd+* would turn into ac+ad+bc+bd. If not, is there a package to page parts of an array to a file or someother manipulation to get around the memory issue. I printed out the array before the join and the array was around 1/2 a gig. What is the byte size limit on a string?

Replies are listed 'Best First'.
Re^3: Out of memory.
by Perlbotics (Archbishop) on Oct 22, 2008 at 10:51 UTC

    Hm. I misunderstood your question, thinking that the digits compose concrete numbers instead of symbols. Well, I think that BrowserUk has already provided a solution that probably suits your problem better than a generic Perl module for symbolic algebra. If you are still interested in such a module you could search CPAN for symbolic and/or algebra or perform a Super Search. This also sounds interesting: recommendations on scientific computing with Perl.

    Maximum string size in Perl: AFIK, its only limited by your OS (e.g. 32bit/64bit) and your hardware (memory, disk). Experimentally, my Perl 5.8.4 on a 64bit Solaris 10 box (8GB) was able to create a string of at least 3945 MB (1MB = 1024 x 1024) before out-of-memory occurred.

    Right, the equation got truncated. If you like, please surround your sample equation with <readmore>...</readmore> tags - although it won't fix the truncation effect, it will make this thread more readable.

      As of yet I have not found a solution. My next guess is to page part of the equation to a database as a way to externalize the problem. Thanks for your input. I am unclear why it is getting "Out of Memory!" I agree with your assessment that it should be.