+// convert back to standard G-function, keep information on small imaginary parts
+ex G_eval_to_G(const Gparameter& a, int scale, const exvector& gsyms)
+{
+ lst z;
+ lst s;
+ for (const auto & it : a) {
+ if (it != 0) {
+ z.append(gsyms[std::abs(it)]);
+ if ( it<0 ) {
+ s.append(-1);
+ } else {
+ s.append(1);
+ }
+ } else {
+ z.append(0);
+ s.append(1);
+ }
+ }
+ return G(z,s,gsyms[std::abs(scale)]);
+}
+