bug(?): garbage produced by archive_node.get_string

Richard B. Kreckel kreckel at thep.physik.uni-mainz.de
Thu Aug 16 13:56:08 CEST 2001


On Thu, 16 Aug 2001, Pearu Peterson wrote:
> Note that if one uses 
> 	static void my_print2(const archive_node & n);
> from the GiNaC Tutorial for expressions that has lenghty string then the
> result of get_string produces some garbage at the end of string.
> For example, the following code
> 
> int main(void)
> {
>     ex e = pow(200, 500);
>     archive ar(e, "e");
>     my_print2(ar.get_top_node(0)); cout << endl;
>     return 0;
> }
> 
> outputs
> 
> numeric(number="32733906078961418700131896968275991522166420460430647894832913680961337964046745548832700923259041571508866841275600710092172565458853930533285275893760000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000!
 00!
>  000000000000000000000000000000000000000000000000000|õÿ¿‚_+ at xÔõÿ¿")
> 
> I am using GiNaC 0.9.2, gcc 2.95.2, Linux MD 7.0.

Pearu, this is unreproducible: it doesn't produce that garbage here.  What
version of CLN are you using and what were the exact compiler switches CLN
and GiNaC were compiled with?

Can other people please try to see if they can reproduce Pearu's problem
on their system?  Thanks.

Regards
     -richy.
-- 
Richard Kreckel
<Richard.Kreckel at Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>





More information about the GiNaC-devel mailing list