<html><head><style data-externalstyle="true"><!--
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}

p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst, p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle, p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
}
--></style></head><body><div data-externalstyle="false" dir="ltr" style="font-family:Calibri,'Segoe UI',Meiryo,'Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic','Khmer UI','Nirmala UI',Tunga,'Lao UI',Ebrima,sans-serif;font-size:12pt;"><div>(sorry for the html email, Marcus...)</div><div>&nbsp;</div><div>The comment in the code says:</div><div>&nbsp;</div><div>+&nbsp;&nbsp;&nbsp;&nbsp; * Set the default precision of tcl to match the legacy vtk default<br>+&nbsp;&nbsp;&nbsp;&nbsp; * precsion.&nbsp; Wrapped code will use the tcl_precision variable to<br>+&nbsp;&nbsp;&nbsp;&nbsp; * define the output resolution for converting doubles to strings<br></div><div data-signatureblock="true">I am only guessing here, because I do not remember making this commit... (it’s possible somebody else did the grunt work and passed it off to me, and I was just the committer)</div><div>&nbsp;</div><div>... but here’s the guess:</div><div>&nbsp;</div><div>We probably observed that updating to a newer version of tcl caused many tests to&nbsp;“fail” because they suddenly got different (more precise than before, with more ascii character content than before) strings back for some operations. I am guessing this line to set the tcl precision was simply to cause the test suite to have identical results when moving between tcl versions. (Was there a tcl release around that time that would have changed the precision from 6 to 12...?)</div><div>&nbsp;</div><div>It would be easy enough to verify this. Somebody who has tcl wrapping turned on could try to change the 6 to a&nbsp;12 and then run the test suite. If a bunch of stuff suddenly&nbsp;“fails” then we would probably have to do a bunch of work to be able to make a change like this for real. And if we did, it would potentially not work with older (ancient? <span style='font-family: "Segoe UI Symbol","Apple Color Emoji";' data-externalstyle="false">😊</span>) versions of tcl.</div><div>&nbsp;</div><div>I’m sure the 6 is not strictly necessary, but it may be quite some effort to change that one digit to those two.</div><div>&nbsp;</div><div>Good luck, tclers...</div><div>&nbsp;</div><div>&nbsp;</div><div>D</div><div>&nbsp;</div><div>&nbsp;</div><div data-signatureblock="true">&nbsp;</div><div>From:&nbsp;Bill Lorensen<br>Sent:&nbsp;‎Thursday‎, ‎May‎ ‎9‎, ‎2013 ‎12‎:‎28‎ ‎PM<br>To:&nbsp;Patrick Lowry<br>Cc:&nbsp;vtkusers@public.kitware.com; David Cole</div><div>&nbsp;</div><div dir="ltr">I see that Dave Cole added this statement in 2008. It overrides the default of 12.</div><div dir="ltr"><br></div><div dir="ltr">Dave, Do you recall why you added this?</div><div dir="ltr">Here is the commit:</div><div dir="ltr"><a title="http://vtk.org/gitweb?p=VTK.git%3ba=commitdiff%3bh=9fa6152eeaf8042715ff98858f511dfe71b180c5" href="http://vtk.org/gitweb?p=VTK.git%3ba=commitdiff%3bh=9fa6152eeaf8042715ff98858f511dfe71b180c5" target="_parent">http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=9fa6152eeaf8042715ff98858f511dfe71b180c5</a><br>
</div><div dir="ltr"><br></div><div dir="ltr">Bill</div><div class="gmail_extra"><br><br></div><div class="gmail_quote">On Thu, May 9, 2013 at 12:15 PM, Bill Lorensen <span dir="ltr">&lt;<a title="mailto:bill.lorensen@gmail.com" href="mailto:bill.lorensen@gmail.com" target="_parent">bill.lorensen@gmail.com</a>&gt;</span> wrote:<br>
</div><blockquote class="gmail_quote" style="margin-top: 0px; margin-bottom: 0px;"><div dir="ltr">The precision is set in:<br><div>Wrapping/Tools/vtkWrapTclInit.c: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;" &nbsp;Tcl_SetVar2(interp, \"tcl_precision\", (char *) NULL, \"6\", TCL_GLOBAL_ONLY);\n");<br>
</div><div>
<br></div><div>Try changing the 6 to 12 and see if that works.</div></div><div class="gmail_extra"><br><br></div><div class="gmail_quote"><div class="h5">On Wed, May 8, 2013 at 3:50 PM, Patrick Lowry <span dir="ltr">&lt;<a title="mailto:plowry.tx@verizon.net" href="mailto:plowry.tx@verizon.net" target="_parent">plowry.tx@verizon.net</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-bottom: 0px;"><div><div class="h5"><div lang="EN-US"><div><p class="MsoNormal"><span>Dear VTK User,</span></p>

<p class="MsoNormal"><span>&nbsp;</span></p><p class="MsoNormal"><span>I am using the pre-compiled binary executable for VTK 5.10 and the Tcl/Tk scripting language.&nbsp; I also have a number of pure Tcl/Tk scripts that do not have VTK method calls and I had notice some time ago that VTK.exe is rounding floating point numbers to six significant digits.&nbsp; This has happened since the early VTK 5.x releases and on multiple PC platforms.&nbsp; It did not happened with the 4.x releases.&nbsp; When I run&nbsp;the same&nbsp;Tcl/Tk script using wish85.exe no rounding occurs.&nbsp; The image below shows the run window of the same script using VTK.exe and wish85.exe.&nbsp; Both show the raw data line and the puts of the second two variables.&nbsp; The one using VTK.exe has rounding and the one using wish85.exe, no rounding. Tcl/Tk has a floating point resolution setting that defaults to 12 significant digits.&nbsp; Clearly VTK.exe is defaulting to 6.</span></p>

<p class="MsoNormal"><span>&nbsp;</span></p><p class="MsoNormal"><span>Can anyone direct me to a setting that will change VTK.exe to work correctly.</span></p>

<p class="MsoNormal"><span>&nbsp;</span></p><p class="MsoNormal"><span>Thanks,</span></p>

<p class="MsoNormal"><span>Patrick</span></p><p class="MsoNormal"><span><img width="777" height="446" tabindex="-1" src="cid:image001.jpg@01CE4BFB.5F0F8450"></span><span></span></p>

</div></div><br></div></div><div>_______________________________________________<br>
Powered by <a title="http://www.kitware.com/" href="http://www.kitware.com" target="_parent">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a title="http://www.kitware.com/opensource/opensource.html" href="http://www.kitware.com/opensource/opensource.html" target="_parent">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a title="http://www.vtk.org/Wiki/VTK_FAQ" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_parent">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a title="http://www.vtk.org/mailman/listinfo/vtkusers" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_parent">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></div></blockquote><span class="HOEnZb"><div class="gmail_extra"><br><br clear="all"></div><div class="gmail_extra"><br></div><div class="gmail_extra">-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div></span><div class="gmail_extra">&nbsp;</div><div>&nbsp;</div></blockquote><div class="gmail_extra"><br><br clear="all"></div><div class="gmail_extra"><br></div><div class="gmail_extra">-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div><div>&nbsp;</div></div></body></html>