[GiNaC-list] Strange behaviour of archive

Phil Stephens stephens at hep.phy.cam.ac.uk
Thu Dec 2 00:42:04 CET 2004


I have found the archiving procedure to behave strangely and was wondering
if anyone has also seen this or if they know the solution. I am using
GiNaC-1.2.1 with cln-1.1.7. This is all compiled with cygwin.

 

What happens is the following. I have a database that I wish to store both
the index and the referenced expression in the archive. For small archives
the numerical factors on my expressions remain rational and the sqrt's
remain un-evalf()'d. Unfortunately, it seems that when my archive gets large
the rational expressions and the sqrt()'s evaluate to real numbers.

 

I have done the following to confirm all of this. My software is using the
same algorithm with no code changed but using two different models. The
models dictate the size of the database. When I save and load with the
smaller model, all the rational and sqrts are returned properly. When I do
so with the larger model, they all return as real numbers. I have used a
viewgar-like program to confirm that they have indeed been saved as real
values, rather than the rationals/sqrts for the larger model, but the
expressions I give to archive_ex have not been evalf'd. Can anyone explain
why this may happen or if this is intentional in the design (speed of
archiving for example)? It seems to occur between creating the archive and
saving it to a file. 

 

It isn't vital to my software, just an aesthetic thing that would be useful
for users. Just as an idea (since I don't really know how to 'reproduce'
this behaviour) the gar file for two models that work properly are 25KB and
205KB but for the one that doesn't work right it is 1.1 MB.

 

Thanks for any help!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.cebix.net/pipermail/ginac-list/attachments/20041202/aad67044/attachment.html


More information about the GiNaC-list mailing list