[metapost] testing mpost 1.790 under Windows and Linux

Boguslaw Jackowski B_Jackowski at GUST.org.pl
Fri Mar 1 15:18:26 CET 2013

Dear Taco,

very many thanks for releasing the version 1.790 of MetaPost.

We have tested it with one of our fonts. The resaults
are nearly good. :)

In a `standard' math mode (low precision) we were able to compile
the whole fonts without problems, the results being identical
to the results produced by mpost 1.5*.

We have four remarks: a serious one and three minor ones.
Let's start with tha latter ones.

1. Minor remarks:

   (a) mpost 1.790 is noticeably slower under Windows than
       the previous, 1.503, version; under Linux i64, there
       is no measurable difference

   (b) even the most trivial program invoked without mem file name
       given explicitly loops generating (infinitely?) many of parethesises:

       This is MetaPost, version 1.790 (kpathsea version 6.1.1dev)  1 MAR 2013 14:47
       (plain.mp Preloading the plain mem file, version 0.63))))))))...

       Passing on the command line parameter --mem=mpost
       cures the problem (note that --mem=mpost.mp doesn't)

   (c) there is a (known) trouble with the syntax of numbers: a digit
       followed by the letter 'e'... -- this is easy to circumvent
       (but still annoying; we have a few formulas containing
       <number>eps or <number>epsilon expressions in our mpost programs)

2. Serious remark: the primitive operation `directiontime' does not work
with the double precision option switched on in some cases.

Namely, for coordinate values close to 0 and multi B\'ezier paths
the results can get unexpected. Below is a simple example of the misbehavior:

   path p[]; pair d;
   p2=fullcircle scaled 100;

   d:=(if scantokens(mpversion)>1.7: -1e-14 else: 0 fi ,250); % proper result
   show (directiontime d of p1), point (directiontime d of p1) of p1;
   show (directiontime d of p2), point (directiontime d of p2) of p2;

   d:=(if scantokens(mpversion)>1.7: 1e-14 else: 0 fi ,250); % improper result
   show (directiontime d of p1), point (directiontime d of p1) of p1;
   show (directiontime d of p2), point (directiontime d of p2) of p2;


The result (both for Linux and Windows) is:

   piotrs at piotrs:~/wrk/mpost$ mpost1790 --mem=mpost -math=double test-math.mp
   This is MetaPost, version 1.790 (kpathsea version 6.1.1dev)
   (mpost.mp (/usr/local/texlive/2012/texmf-dist/metapost/base/plain.mp
   Preloading the plain mem file, version 1.004)) (./test-math.mp

   >> 1
   >> (50,0)
   >> 0
   >> (50,0)

   >> 0
   >> (0,-50)
   >> 7
   >> (35.35533919930458,-35.35533919930458) )

In the previous version, the second group of printouts was of course 
the same is first one. We guess that there is somewhere an error
of +/-1 type, but we are not able to trace it deeper.

Cheers -- loking forward to hearing from you before long -- Jacko and Piotr

  Bogus\l{}aw Jackowski: B_Jackowski at GUST.ORG.PL
  Hofstadter's Law: It always takes longer than you expect, even
                    when you take into account Hofstadter's Law.

More information about the metapost mailing list