Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions sources/flintinterface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion sources/grcc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
16 changes: 9 additions & 7 deletions sources/sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
/* #define TESTGARB */

#include "form3.h"
#include <math.h>

#ifdef WITHPTHREADS
UBYTE THRbuf[100];
Expand All @@ -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++;
}
Expand All @@ -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]);
}
}

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down
Loading