[metapost] Metafun: the pi number in double precision

Franck Pastor franck.pastor at me.com
Thu Jan 30 10:41:18 CET 2014


Le 29 janv. 2014 à 17:14, luigi scarso <luigi.scarso at gmail.com> a écrit :

> 
> 
> Sorry for the delay. With the latest (patched) metafun I have 
> 
> $ /opt/luatex/standalone-mkiv-new/tex/texmf-linux-64/bin/mpost -mem=metafun -numbersystem=double "\relax show pi; bye." 
> This is MetaPost, version 1.803 (kpathsea version 6.1.1)
> (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/metafun.mp (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/metafun.mpii (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/mp-base.mpii
> Preloading the plain mem file, version 1.004 for metafun ii) (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/mp-tool.mpii) (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/mp-spec.mpii)
> (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/mp-core.mpii) (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/mp-page.mpii)
> (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/mp-text.mpii) (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/mp-txts.mpii)
> (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/mp-shap.mpii) (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/mp-butt.mpii)
> (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/mp-char.mpii) (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/mp-step.mpii)
> (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/mp-grph.mpii) (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/mp-figs.mpii)
> (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/mp-grid.mpii (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/mp-form.mpii (/opt/luatex/standalone-mkiv-new/tex/texmf/metapost/base/string.mp)
> (/opt/luatex/standalone-mkiv-new/tex/texmf/metapost/base/marith.mp (/opt/luatex/standalone-mkiv-new/tex/texmf/metapost/base/string.mp)))) (/opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base/mp-func.mpii)))
>>> 3.14159265358979
> Transcript written on mpout.log.
> 
> This is because now 
> /opt/luatex/standalone-mkiv-new/tex/texmf-context/metapost/context/base$ grep 'pi :=' *
> mp-tool.mpii:pi := 3.14159265358979323846 ; radian := 180/pi ; % 2pi*radian = 360 ;
> mp-tool.mpiv:pi := 3.14159265358979323846 ; radian := 180/pi ; % 2pi*radian = 360 ;
> 
> Note that on command line mpost calls the *mpii files: The *mpiv files are used only within context (which load the mplib lib) .
> Also on the last *mpii  series of files you need to add 
> 
> color cyan, magenta, yellow; 
> to mp-base.mpii
> 
> and 
> newinternal metapostversion ; metapostversion := scantokens(mpversion) ;
> to mp-tool.mpii 
> 
> i.e.
> 
> $ diff mp-base.mpii.orig mp-base.mpii 
> 113c113
> < color black, white, red, green, blue, background;
> ---
>> color black, white, red, green, blue, cyan, magenta, yellow, background;
> 
> $ diff mp-tool.mpii.orig mp-tool.mpii 
> 2660a2661
>> newinternal metapostversion ; metapostversion := scantokens(mpversion) ;
> 
> 
> I think they will be patched soon (in this way or in an equivalent one), I have already contacted H. Hagen for them.
> 
> -- 
> luigi


Great, thanks!

Franck Pastor





More information about the metapost mailing list