Skip to content
Prev 33469 / 398525 Next

make check and postscript output in R 1.7.1

Don MacQueen <macq at llnl.gov> writes:
No, I don't think so. However, differencing after rounding (to two
digits) plus slightly odd formatting routines might do it. You have
the source... The logic is this:

static void PostScriptRLineTo(FILE *fp, double x0, double y0,
                              double x1, double y1)
{
    double x = rround(x1, 2) - rround(x0, 2),
        y = rround(y1, 2) - rround(y0, 2);

    if(x == 0) fprintf(fp, "0"); else fprintf(fp, "%.2f", x);
    if(y == 0) fprintf(fp, " 0"); else fprintf(fp, " %.2f", y);
    fprintf(fp, " l\n");
}

and it would seem that on some machines, rround(.,2) is not a perfect
step function, in that you can have two numbers rounded to slightly
different values.

(I see the same effect on Solaris 9, gcc 2.95.3 BTW. So you're not the
only one forgetting to platform test. It's just that our Sun is so
terribly slooooow...)