diff --git a/sources/flintinterface.cc b/sources/flintinterface.cc index ef524234..49434751 100644 --- a/sources/flintinterface.cc +++ b/sources/flintinterface.cc @@ -144,11 +144,11 @@ WORD* flint::divmod_mpoly(PHEAD const WORD *a, const WORD *b, const bool return_ // Write out the result write = true; if ( return_rem ) { - (uint64_t)flint::to_argument_mpoly(BHEAD res, with_arghead, must_fit_term, write, prev_size, + flint::to_argument_mpoly(BHEAD res, with_arghead, must_fit_term, write, prev_size, rem.d, var_map, ctx.d, sort_vars, scale.d); } else { - (uint64_t)flint::to_argument_mpoly(BHEAD res, with_arghead, must_fit_term, write, prev_size, + flint::to_argument_mpoly(BHEAD res, with_arghead, must_fit_term, write, prev_size, div.d, var_map, ctx.d, sort_vars, scale.d); } @@ -217,11 +217,11 @@ WORD* flint::divmod_poly(PHEAD const WORD *a, const WORD *b, const bool return_r // Write out the result write = true; if ( return_rem ) { - (uint64_t)flint::to_argument_poly(BHEAD res, with_arghead, must_fit_term, write, prev_size, + flint::to_argument_poly(BHEAD res, with_arghead, must_fit_term, write, prev_size, rem.d, var_map, scale.d); } else { - (uint64_t)flint::to_argument_poly(BHEAD res, with_arghead, must_fit_term, write, prev_size, + flint::to_argument_poly(BHEAD res, with_arghead, must_fit_term, write, prev_size, div.d, var_map, scale.d); } diff --git a/sources/grcc.cc b/sources/grcc.cc index d8ec1b8d..1aaf276a 100644 --- a/sources/grcc.cc +++ b/sources/grcc.cc @@ -6542,7 +6542,7 @@ void EGraph::fromDGraph(DGraph *dg) esym = 1; extperm = 1; multp = 1; - maxdeg = maxdeg; + //maxdeg = maxdeg; for (n0 = 0; n0 < dg->nnodes; n0++) { nodes[n0]->deg = 0; diff --git a/sources/sort.c b/sources/sort.c index 88199825..35048a70 100644 --- a/sources/sort.c +++ b/sources/sort.c @@ -59,6 +59,7 @@ /* #define TESTGARB */ #include "form3.h" +#include #ifdef WITHPTHREADS UBYTE THRbuf[100]; @@ -82,11 +83,12 @@ char *toterms[] = { " ", " >>", "-->" }; #define HUMANSTRLEN 12 #define HUMANSUFFLEN 4 -const char humanTermsSuffix[HUMANSUFFLEN][4] = {"K ","M ","B ","T "}; -const char humanBytesSuffix[HUMANSUFFLEN][4] = {"KiB","MiB","GiB","TiB"}; -void HumanString(char* string, float input, const char suffix[HUMANSUFFLEN][4]) { +#define HUMANSUFFSTRLEN 4 +const char humanTermsSuffix[HUMANSUFFLEN][HUMANSUFFSTRLEN] = {"K ","M ","B ","T "}; +const char humanBytesSuffix[HUMANSUFFLEN][HUMANSUFFSTRLEN] = {"KiB","MiB","GiB","TiB"}; +void HumanString(char* string, float input, const char suffix[HUMANSUFFLEN][HUMANSUFFSTRLEN]) { int ind = -1; - while (ind < 0 || (input >= 1000.0f && ind < HUMANSUFFLEN) ) { + while (ind < 0 || (input >= 1000.0f && ind+1 < HUMANSUFFLEN) ) { input /= 1000.0f; ind++; } @@ -96,7 +98,7 @@ void HumanString(char* string, float input, const char suffix[HUMANSUFFLEN][4]) } else { snprintf(string, HUMANSTRLEN, - " (%3.f %s)", input, suffix[ind]); + " (%3ld %s)", lroundf(input), suffix[ind]); } } @@ -131,7 +133,7 @@ void WriteStats(POSITION *plspace, WORD par, WORD checkLogType) GETIDENTITY char buf[120]; LONG millitime; - WORD timepart; + UWORD timepart; SORTING *S; int use_wtime; @@ -211,7 +213,7 @@ void WriteStats(POSITION *plspace, WORD par, WORD checkLogType) char *wpref = use_wtime ? "W" : ""; char *wspac = use_wtime ? "" : " "; millitime = use_wtime ? TimeWallClock(1) * 10 : TimeCPU(1); - timepart = (WORD)(millitime%1000); + timepart = (UWORD)(millitime%1000); millitime /= 1000; timepart /= 10;