<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 2 Nov 2022 at 20:01, luigi scarso <<a href="mailto:luigi.scarso@gmail.com">luigi.scarso@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 2 Nov 2022 at 18:38, Toby Thurston <<a href="mailto:thurston@eml.cc" target="_blank">thurston@eml.cc</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Can I draw your attention to this unanswered question on TeX.SE?<br>
<br>
<a href="https://tex.stackexchange.com/q/507361/15036" rel="noreferrer" target="_blank">https://tex.stackexchange.com/q/507361/15036</a><br>
<br>
the questioner had found that this graph is created correctly with the scaled number system<br>
<br></blockquote><div><br></div><div>hm... I will check surely for this weekend.</div><div><br></div></div></div></blockquote><div><br></div><div>I am afraid that there's nothing we can do... <a href="http://graph.mp">graph.mp</a> uses <a href="http://marith.mp">marith.mp</a>, which is fine only for the scaled numbersystem.</div><div>We ca see the problem here: save the example below as <a href="http://test.mp">test.mp</a>, <a href="http://test-decimal.mp">test-decimal.mp</a> and <a href="http://test-decimal10.mp">test-decimal10.mp</a> </div><div><br></div><div>loggingall;<br>%%numberprecision:=10; <br>prologues := 3;<br>outputtemplate := "%j%c.%{outputformat}";<br>input graph<br>beginfig(1);<br>numeric width; width = 7cm;<br>draw begingraph(width, 0.618034 width);<br> setrange((-4, 0), (11, 100));<br> gdraw "setrange.data";<br>endgraph;<br>endfig;<br>end.<br></div><div>where in <a href="http://test-decimal10.mp">test-decimal10.mp</a> we uncomment %%numberprecision:=10; </div><div>then</div><div>$>mpost <a href="http://test.mp">test.mp</a><br>$>mpost -numbersystem=decimal <a href="http://test-decimal.mp">test-decimal.mp</a><br>$>mpost -numbersystem=decimal <a href="http://test-decimal10.mp">test-decimal10.mp</a><br></div><div><br></div><div>If we </div><div>$>diff -y -W200 test.log test-decimal.log<br>at some point we see</div><div><br></div><div><font face="monospace">Mabs<primary>->begingroup(EXPR2)*0.5*2endgroup Mabs<primary>->begingroup(EXPR2)*0.5*2endgroup<br>(SUFFIX0)<- (SUFFIX0)<-<br>(SUFFIX1)<-Mabs (SUFFIX1)<-Mabs<br>(EXPR2)<-354.89137 | (EXPR2)<-354.8913717054810609216228461865864<br>{begingroup} {begingroup}<br>{(354.89137)*(0.5)} | {(354.8913717054810609216228461865864)*(0.5)}<br>{(177.4457)*(2)} | {(177.4456858527405304608114230932932)*(2)}<br>{endgroup} {endgroup}<br>{(354.89137)=(354.89139)} | {(354.8913717054810609216228461865864)=(354.8913717054810609216228461865864)}<br>{false} | {true}<br>{fi} | {else}<br>{mexp(354.89137)} | {mexp(354.8913717054810609216228461865864)}<br>{-(4)} <<br>{endgroup} {endgroup}<br>{restoring warningcheck=0} {restoring warningcheck=0}<br>{endgroup} {endgroup}<br>{(X_.low)=(-4)} | {(X_.low)=(4.000000238418586206989998773161838)}<br>## X_.low=-4 | ## X_.low=4.000000238418586206989998773161838<br>{if} {if}<br>{length(2)} {length(2)}<br>{(2)<>(1)} {(2)<>(1)}<br>{true} {true}<br></font></div><div><font face="monospace"><br></font></div><div><font face="monospace">while</font></div><div>$>diff -y -W200 test.log test-decimal10.log<br></div><div><br></div><div> <font face="monospace">Mabs<primary>->begingroup(EXPR2)*0.5*2endgroup Mabs<primary>->begingroup(EXPR2)*0.5*2endgroup</font></div><font face="monospace">(SUFFIX0)<- (SUFFIX0)<-<br>(SUFFIX1)<-Mabs (SUFFIX1)<-Mabs<br>(EXPR2)<-354.89137 | (EXPR2)<-354.8913717<br>{begingroup} {begingroup}<br>{(354.89137)*(0.5)} | {(354.8913717)*(0.5)}<br>{(177.4457)*(2)} | {(177.4456859)*(2)}<br>{endgroup} {endgroup}<br>{(354.89137)=(354.89139)} | {(354.8913717)=(354.8913718)}<br>{false} {false}<br>{fi} {fi}<br>{mexp(354.89137)} | {mexp(354.8913717)}<br>{-(4)} | {-(4.00000024)}<br>{endgroup} {endgroup}<br>{restoring warningcheck=0} {restoring warningcheck=0}<br>{endgroup} {endgroup}<br>{(X_.low)=(-4)} | {(X_.low)=(-4.00000024)}<br>## X_.low=-4 | ## X_.low=-4.00000024<br>{if} {if}<br>{length(2)} {length(2)}<br>{(2)<>(1)} {(2)<>(1)}<br>{true} {true}</font><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
</blockquote></div><div class="gmail_quote"><font face="monospace"><br></font></div><div class="gmail_quote"><font face="monospace"><br></font></div><div class="gmail_quote">(<a href="http://test-decimal10.mp">test-decimal10.mp</a> fails in another point, btw).<font face="monospace"><br></font></div><div class="gmail_quote">Same for the double and the binary numbersystem.</div><div class="gmail_quote"><font face="monospace"><br></font></div><div class="gmail_quote"><font face="monospace"><br></font></div><div class="gmail_quote"><font face="arial, sans-serif">--</font></div><div class="gmail_quote"><font face="arial, sans-serif">luigi</font></div></div>