[metapost] The numbersystem internal.

Daniel H. Luecking luecking at uark.edu
Wed Jan 15 21:49:14 CET 2014


Three things:

1. At the (windows 7) command line one can activate double precision in 
metapost with
    mpost -numbersystem="double" file
However
    mpost -s numbersystem="double" file
produces a warning and the "scaled" value is assigned. It seems it 
needs to be
    mpost -s numbersystem=\"double\"
Windows normally lets a program do its own processing of double 
quotes, and it seems curious (to me) that mpost handles them 
differently in the two cases. I suppose the reason is obvious to 
experienced programmers...

2. Changing the value of the string numbersystem within a file has 
no effect (on the number system), but metapost will not complain and 
will in fact change the value. This renders a test like
    if numbersystem="double": <stuff for double> 
    else: <stuff for scaled> 
    fi
potentially invalid. I realize that the test 
    if 3.14159=3.141592: <stuff for scaled> 
    else: <stuff for double> 
    fi
can be used, but that leads me to the third point:

3. What are the number systems "binary" and "decimal" mentioned in
mpost --help? Are they just other names for "double"? They seem to 
have the same effect in some (very simple) tests.

Regards,
Dan

-- 
Daniel H. Luecking
Department of Mathematical Sciences
University of Arkansas
Fayetteville, Arkansas


More information about the metapost mailing list