<?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: Round down Integer to odd number. in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/Round-down-Integer-to-odd-number/m-p/962429#M212987</link>
    <description>&lt;HTML&gt;
 &lt;HEAD&gt;
 &lt;/HEAD&gt;&lt;BODY&gt;
  &lt;DIV&gt;
   Just positive
  &lt;/DIV&gt;
 
&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jul 2024 02:47:59 GMT</pubDate>
    <dc:creator>ppal</dc:creator>
    <dc:date>2024-07-22T02:47:59Z</dc:date>
    <item>
      <title>Round down Integer to odd number.</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Round-down-Integer-to-odd-number/m-p/962416#M212983</link>
      <description>&lt;P&gt;Lets say I have an integer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If even number then round down to an odd number.&lt;/P&gt;
&lt;P&gt;If odd then keep the number.&lt;/P&gt;
&lt;P&gt;eg. x = 888&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to round this&amp;nbsp; down to an odd number. 887&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 00:44:52 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Round-down-Integer-to-odd-number/m-p/962416#M212983</guid>
      <dc:creator>ppal</dc:creator>
      <dc:date>2024-07-22T00:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Round down Integer to odd number.</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Round-down-Integer-to-odd-number/m-p/962419#M212984</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Like this using two functions.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 505px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108049iEB5BA46882AF42F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;Terry&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 01:08:42 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Round-down-Integer-to-odd-number/m-p/962419#M212984</guid>
      <dc:creator>terryhendicott</dc:creator>
      <dc:date>2024-07-22T01:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Round down Integer to odd number.</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Round-down-Integer-to-odd-number/m-p/962421#M212986</link>
      <description>&lt;P&gt;Should this also apply to zero and negative integers?&lt;/P&gt;
&lt;P&gt;At least that's&amp;nbsp; what your description demands and what Terry's solution provides.&lt;/P&gt;
&lt;P&gt;BTW, if your inputs are only integers, you may also omit the "floor" functions:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_0-1721613775123.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108050i7C2A460D28C052CD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Werner_E_0-1721613775123.png" alt="Werner_E_0-1721613775123.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you intend to use the function for positive integers only, you may also try this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_1-1721613856746.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108051i90887EF3D4D205ED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Werner_E_1-1721613856746.png" alt="Werner_E_1-1721613856746.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Note the capital "R" in "Round". You see that the result for negative odd inputs is 'wrong'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case you rather intend to round "in the direction of zero" (basically apply the rounding to the absolute value of the input) you may use&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_4-1721614097105.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108054iBF5E3EFC98E5D8D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Werner_E_4-1721614097105.png" alt="Werner_E_4-1721614097105.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Of course you get the same result with&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_3-1721614084135.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108053iB378E4AEFEE2D67A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Werner_E_3-1721614084135.png" alt="Werner_E_3-1721614084135.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And at last here is an alternative function doing exactly what you demanded (and what Terry's function also provides)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_5-1721614584651.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108055iF9F45CE138460CB5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Werner_E_5-1721614584651.png" alt="Werner_E_5-1721614584651.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 02:17:40 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Round-down-Integer-to-odd-number/m-p/962421#M212986</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2024-07-22T02:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: Round down Integer to odd number.</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Round-down-Integer-to-odd-number/m-p/962429#M212987</link>
      <description>&lt;HTML&gt;
 &lt;HEAD&gt;
 &lt;/HEAD&gt;&lt;BODY&gt;
  &lt;DIV&gt;
   Just positive
  &lt;/DIV&gt;
 
&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2024 02:47:59 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Round-down-Integer-to-odd-number/m-p/962429#M212987</guid>
      <dc:creator>ppal</dc:creator>
      <dc:date>2024-07-22T02:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Round down Integer to odd number.</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Round-down-Integer-to-odd-number/m-p/962516#M212989</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/255687"&gt;@ppal&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;DIV&gt;Just positive&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Then you can use any of the five suggestions.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 10:47:04 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Round-down-Integer-to-odd-number/m-p/962516#M212989</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2024-07-22T10:47:04Z</dc:date>
    </item>
  </channel>
</rss>

