[metapost] The numbersystem internal.
Taco Hoekwater
taco at elvenkind.com
Thu Jan 16 09:13:51 CET 2014
Hi Dan,
On 15 Jan 2014, at 21:49, Daniel H. Luecking <luecking at uark.edu> wrote:
> 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…
That is because the quotes need to survive the command line
parsing routines. I can look and see if it is something metapost
can solve (in a portable way).
> 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.
That is bad, I did not realise. In the next release, there will be an
error on attempts to assign to ‘numbersystem’.
> 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.
They are placeholders for the two extra formats planned for metapost 2.0:
binary = arbitrary precision with base 2, decimal = arbitrary precision
with base 10.
Best wishes,
Taco
More information about the metapost
mailing list