bug(?): garbage produced by archive_node.get_string

Pearu Peterson pearu at cens.ioc.ee
Thu Aug 16 12:41:52 CEST 2001


Hi,

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="3273390607896141870013189696827599152216642046043064789483291368096133796404674554883270092325904157150886684127560071009217256545885393053328527589376000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|õÿ¿‚_+ at xÔõÿ¿")

I am using GiNaC 0.9.2, gcc 2.95.2, Linux MD 7.0.

Best regards,
	Pearu




More information about the GiNaC-devel mailing list