<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can someone quickly explain why &amp;quot;rtos&amp;quot; rounds and minuses potential string characters? in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/can-someone-quickly-explain-why-quot-rtos-quot-rounds-and/m-p/12819046#M13258</link>
    <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/593837"&gt;@ronjonp&lt;/a&gt;&amp;nbsp;.&amp;nbsp; I didn't know that.&lt;/P&gt;&lt;P&gt;My only problem is that the symbol names imply to me some kind of water or sewage conduit.&amp;nbsp; Normally we civils treat conduit slopes as from upstream to downstream, in which case one would subtract the higher number from the lower number and end up with a negative slope value, meaning the fluid is flowing downhill, as it should be if the only force is gravity.&amp;nbsp; Then again, performing pipe capacity calculations we treat all slopes as positive, lest we like imaginary numbers (or whatever they're called) trying to calculate the square root of a negative slope.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jun 2024 00:55:36 GMT</pubDate>
    <dc:creator>john.uhden</dc:creator>
    <dc:date>2024-06-05T00:55:36Z</dc:date>
    <item>
      <title>Can someone quickly explain why "rtos" rounds and minuses potential string characters?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/can-someone-quickly-explain-why-quot-rtos-quot-rounds-and/m-p/12815849#M13253</link>
      <description>&lt;P&gt;Working on a simple calculation lisp here and I ran into an issue I don't understand. I was always under the impression that "rtos" took a real number exactly for what it was and made it into a string, apparently it does not. How come if I take the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:test\ ( / upstr dwnstr dist calc )
	(setq upstr 390.17)
	(setq dwnstr 380.17)
	(setq dist 112.73)
	(setq calc (/ (- upstr dwnstr) dist))
	(princ calc)
	(princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I get 0.0887075 but if I add the following rtos function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:test\ ( / upstr dwnstr dist calc )
	(setq upstr 390.17)
	(setq dwnstr 380.17)
	(setq dist 112.73)
	(setq calc (rtos (/ (- upstr dwnstr) dist)))
	(princ calc)
	(princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;my new result is .0887&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how come rtos gets rid of my initial "0" and whatever is after the 4th character? where is the "075" at the end? why isn't it a literal translation? what if I need to work with the entire real&amp;nbsp; number result as a string how would I truly get it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any insight is appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2024 18:38:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/can-someone-quickly-explain-why-quot-rtos-quot-rounds-and/m-p/12815849#M13253</guid>
      <dc:creator>3rduser</dc:creator>
      <dc:date>2024-06-03T18:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone quickly explain why "rtos" rounds and minuses potential string characters?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/can-someone-quickly-explain-why-quot-rtos-quot-rounds-and/m-p/12815875#M13254</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15423175"&gt;@3rduser&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Have a read &lt;A href="https://www.lee-mac.com/consistentrtos.html" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;HERE&lt;/STRONG&gt;&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2024 18:51:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/can-someone-quickly-explain-why-quot-rtos-quot-rounds-and/m-p/12815875#M13254</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2024-06-03T18:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone quickly explain why "rtos" rounds and minuses potential string characters?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/can-someone-quickly-explain-why-quot-rtos-quot-rounds-and/m-p/12815881#M13255</link>
      <description>&lt;P&gt;Read about&lt;A href="https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-D03ABBC2-939A-44DB-8C93-FC63B64DE4A2" target="_blank" rel="noopener"&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt; (rtos)&lt;/FONT&gt; &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/A&gt;in the AutoLisp Reference [always the first place to look].&amp;nbsp; It will tell you, for example, that you get to specify how many decimal places it includes.&amp;nbsp; If you don't specify, it will use whatever your current Units precision setting is.&amp;nbsp; Interestingly, that is limited to 8 decimal places, but you can take the precision a lot further in&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;STRONG&gt; (rtos)&lt;/STRONG&gt; &lt;/FONT&gt;[within AutoCAD's number-handling limitation to "only" 16 significant figures].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;[EDIT:&amp;nbsp; But consider also whether a precision down to less than a 10,000th of whatever your drawing unit represents is actually &lt;EM&gt;meaningful&lt;/EM&gt; at all.]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The &lt;A href="https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-A1860981-FE1C-4947-927B-7CD6B8CEF8EE" target="_blank" rel="noopener"&gt;DIMZIN&lt;/A&gt; System Variable setting determines whether leading and/or trailing zeroes are suppressed.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2024 19:11:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/can-someone-quickly-explain-why-quot-rtos-quot-rounds-and/m-p/12815881#M13255</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-06-03T19:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone quickly explain why "rtos" rounds and minuses potential string characters?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/can-someone-quickly-explain-why-quot-rtos-quot-rounds-and/m-p/12815945#M13256</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/593837"&gt;@ronjonp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for the insights! much appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2024 19:33:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/can-someone-quickly-explain-why-quot-rtos-quot-rounds-and/m-p/12815945#M13256</guid>
      <dc:creator>3rduser</dc:creator>
      <dc:date>2024-06-03T19:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone quickly explain why "rtos" rounds and minuses potential string characters?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/can-someone-quickly-explain-why-quot-rtos-quot-rounds-and/m-p/12816024#M13257</link>
      <description>&lt;P data-unlink="true"&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15423175"&gt;@3rduser&lt;/a&gt;&amp;nbsp;Glad to help.&amp;nbsp; Look into &lt;STRONG&gt;&lt;A href="https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-33B0CA43-84F2-46DE-88BE-8FFF22C83FAD" target="_blank" rel="noopener"&gt;vl-princ-to-string&lt;/A&gt;.&lt;/STRONG&gt;&amp;nbsp; It does not have the dimzin limit.&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(defun c:test\ (/ upstr dwnstr dist calc)
  (setq upstr 390.17)
  (setq dwnstr 380.17)
  (setq dist 112.73)
  (setq calc (vl-princ-to-string (/ (- upstr dwnstr) dist)))
  (princ calc)
  (princ)
)
;; Command: TEST\
;; 0.0887075&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 03 Jun 2024 20:09:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/can-someone-quickly-explain-why-quot-rtos-quot-rounds-and/m-p/12816024#M13257</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2024-06-03T20:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone quickly explain why "rtos" rounds and minuses potential string characters?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/can-someone-quickly-explain-why-quot-rtos-quot-rounds-and/m-p/12819046#M13258</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/593837"&gt;@ronjonp&lt;/a&gt;&amp;nbsp;.&amp;nbsp; I didn't know that.&lt;/P&gt;&lt;P&gt;My only problem is that the symbol names imply to me some kind of water or sewage conduit.&amp;nbsp; Normally we civils treat conduit slopes as from upstream to downstream, in which case one would subtract the higher number from the lower number and end up with a negative slope value, meaning the fluid is flowing downhill, as it should be if the only force is gravity.&amp;nbsp; Then again, performing pipe capacity calculations we treat all slopes as positive, lest we like imaginary numbers (or whatever they're called) trying to calculate the square root of a negative slope.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 00:55:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/can-someone-quickly-explain-why-quot-rtos-quot-rounds-and/m-p/12819046#M13258</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2024-06-05T00:55:36Z</dc:date>
    </item>
  </channel>
</rss>

