]> www.ginac.de Git - ginac.git/blobdiff - ginac/excompiler.cpp
Univariate Hensel lifting now uses upoly.
[ginac.git] / ginac / excompiler.cpp
index 4cf284163036ee97f310c0b3bcc761ccbf9d4a02..bc076945e77122aa499279324f2e2db533d3609e 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2007 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -110,7 +110,7 @@ public:
        {
                if (filename.empty()) {
                        // fill filename with unique random word
-                       const char* filename_pattern = "GiNaCXXXXXX";
+                       const char* filename_pattern = "./GiNaCXXXXXX";
                        char* new_filename = new char[strlen(filename_pattern)+1];
                        strcpy(new_filename, filename_pattern);
                        if (!mktemp(new_filename)) {
@@ -246,14 +246,14 @@ void compile_ex(const ex& expr, const symbol& sym1, const symbol& sym2, FUNCP_2P
 void compile_ex(const lst& exprs, const lst& syms, FUNCP_CUBA& fp, const std::string filename)
 {
        lst replacements;
-       for (int count=0; count<syms.nops(); ++count) {
+       for (std::size_t count=0; count<syms.nops(); ++count) {
                std::ostringstream s;
                s << "a[" << count << "]";
                replacements.append(syms.op(count) == symbol(s.str()));
        }
 
        std::vector<ex> expr_with_cname;
-       for (int count=0; count<exprs.nops(); ++count) {
+       for (std::size_t count=0; count<exprs.nops(); ++count) {
                expr_with_cname.push_back(exprs.op(count).subs(replacements));
        }
 
@@ -263,7 +263,7 @@ void compile_ex(const lst& exprs, const lst& syms, FUNCP_CUBA& fp, const std::st
 
        ofs << "void compiled_ex(const int* an, const double a[], const int* fn, double f[])" << std::endl;
        ofs << "{" << std::endl;
-       for (int count=0; count<exprs.nops(); ++count) {
+       for (std::size_t count=0; count<exprs.nops(); ++count) {
                ofs << "f[" << count << "] = ";
                expr_with_cname[count].print(GiNaC::print_csrc_double(ofs));
                ofs << ";" << std::endl;