<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
		<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in</link>
		<description>Posts in the discussion thread &quot;How to get numerator/denominator of fractions seperately in 68k TI-BASIC?&quot;</description>
				<copyright></copyright>
		<lastBuildDate>Sun, 14 Jun 2026 22:39:26 +0000</lastBuildDate>
		
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-4021018#post-3617403</guid>
				<title>Re: How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
				<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in#post-3617403</link>
				<description></description>
				<pubDate>Sat, 21 Oct 2017 17:36:45 +0000</pubDate>
				<wikidot:authorName>Battlesquid</wikidot:authorName>				<wikidot:authorUserId>2693561</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Yep, that works! Great job on the optimization :)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-4021018#post-3617390</guid>
				<title>Re: How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
				<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in#post-3617390</link>
				<description></description>
				<pubDate>Sat, 21 Oct 2017 16:31:51 +0000</pubDate>
				<wikidot:authorName>Step7</wikidot:authorName>				<wikidot:authorUserId>3404001</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Think I've muddled the code I was thinking of with what you've listed.</p> <p>Try..</p> <div class="code"> <pre><code>setMode(&quot;Exact/Approx&quot;,&quot;EXACT&quot;) string(frac)&amp;&quot;/1&quot;→str inString(str,&quot;/&quot;)→pos expr(left(str,pos-1))→num expr(right(str,pos+1))→denom</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-4021018#post-3617385</guid>
				<title>Re: How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
				<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in#post-3617385</link>
				<description></description>
				<pubDate>Sat, 21 Oct 2017 16:18:55 +0000</pubDate>
				<wikidot:authorName>Battlesquid</wikidot:authorName>				<wikidot:authorUserId>2693561</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Yep, I still get a syntax error. The only way I could position the 1 was to add it outside the parenthesis, and that just added 1 to the value of the denominator. I tried out using <tt>2/3</tt>, and it worked perfectly&#8230;</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-4021018#post-3617376</guid>
				<title>Re: How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
				<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in#post-3617376</link>
				<description></description>
				<pubDate>Sat, 21 Oct 2017 15:55:23 +0000</pubDate>
				<wikidot:authorName>Step7</wikidot:authorName>				<wikidot:authorUserId>3404001</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I was suggesting adding 1 to Pos2 (not resulting Denom), to skip one place right of the &quot;/&quot;, think as you have it will get &quot;/3&quot; returned and error on evaluating that expression?</p> <div class="code"> <pre><code>expr(right(str,pos2+1))→denom</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-4021018#post-3617360</guid>
				<title>Re: How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
				<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in#post-3617360</link>
				<description></description>
				<pubDate>Sat, 21 Oct 2017 15:14:46 +0000</pubDate>
				<wikidot:authorName>Battlesquid</wikidot:authorName>				<wikidot:authorUserId>2693561</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Woah, never saw that solution, great job Step7! I decided to put everything in variables because it would be easier to read.</p> <p>Also, the code works with the current <tt>expr(right(str,pos2))→denom</tt>, adding one would increase the value of the denominator, which would be inaccurate, and putting the one inside the <tt>right()</tt> command yields a syntax error.</p> <p>And I never realized that there were commands that separate the numerator and denominator. Like I said, I always make overly complicated programs :)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-4021018#post-3617354</guid>
				<title>Re: How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
				<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in#post-3617354</link>
				<description></description>
				<pubDate>Sat, 21 Oct 2017 15:00:29 +0000</pubDate>
				<wikidot:authorName>Step7</wikidot:authorName>				<wikidot:authorUserId>3404001</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>NP, should read pos2+1 though? :p.</p> <p>Suggest..</p> <div class="code"> <pre><code>string(frac)&amp;&quot;/1&quot;→str</code></pre></div> <p>..to avoid Domain Error when handling fractions that resolve to whole numbers e.g 3/1, 16/16.. code will return Denom of 1.</p> <p>Last three lines could be boiled down to 2 and no need for variables, but will leave that for now as I see OP has found in-built functions to the job a whole lot better:)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-4021018#post-3617349</guid>
				<title>Re: How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
				<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in#post-3617349</link>
				<description></description>
				<pubDate>Sat, 21 Oct 2017 14:43:38 +0000</pubDate>
				<wikidot:authorName>Battlesquid</wikidot:authorName>				<wikidot:authorUserId>2693561</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Fixed that typo, thanks for pointing that out :)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-4021018#post-3617347</guid>
				<title>Re: How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
				<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in#post-3617347</link>
				<description></description>
				<pubDate>Sat, 21 Oct 2017 14:35:46 +0000</pubDate>
				<wikidot:authorName>Step7</wikidot:authorName>				<wikidot:authorUserId>3404001</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Nice work :) works with unity denominators too, which squid's code won't (domain errors for 3/1, 16/16).</p> <p>+1 on TO DO:<br /> tibasicdev•wikidot•com/68k:getdenom<br /> tibasicdev•wikidot•com/68k:getnum</p> <p>I have a similar requirement to extract powers from expressions like 2<sup>2</sup>.5<sup>5</sup>. Squid's code could be modified to yield those, but is there built in functions to do this also? Will start a new thread if no answers here..</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-4021018#post-3617335</guid>
				<title>Re: How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
				<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in#post-3617335</link>
				<description></description>
				<pubDate>Sat, 21 Oct 2017 14:09:09 +0000</pubDate>
				<wikidot:authorName>LoganDark</wikidot:authorName>				<wikidot:authorUserId>3377445</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <div class="code"> <pre><code>2/3→frac getNum(frac) © 2 getDenom(frac) © 3</code></pre></div> <p>Wiki pages please? I honestly don't know how to fill out the command template.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-4021018#post-3617198</guid>
				<title>Re: How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
				<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in#post-3617198</link>
				<description></description>
				<pubDate>Sat, 21 Oct 2017 06:32:17 +0000</pubDate>
				<wikidot:authorName>Step7</wikidot:authorName>				<wikidot:authorUserId>3404001</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Definitely fun.. (I might have a go at a code example for this after some sleep :o) Typo on last line tho? Should that be pos2 not pos?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-4021018#post-3617193</guid>
				<title>Re: How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
				<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in#post-3617193</link>
				<description></description>
				<pubDate>Sat, 21 Oct 2017 06:09:01 +0000</pubDate>
				<wikidot:authorName>Battlesquid</wikidot:authorName>				<wikidot:authorUserId>2693561</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I usually make overly complicated programs. I think I know how to incorporate <tt><a href="http://tibasicdev.wikidot.com/68k:right">right()</a></tt> into the code, but making this code was way more fun :P</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-4021018#post-3617187</guid>
				<title>Re: How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
				<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in#post-3617187</link>
				<description></description>
				<pubDate>Sat, 21 Oct 2017 06:02:46 +0000</pubDate>
				<wikidot:authorName>Step7</wikidot:authorName>				<wikidot:authorUserId>3404001</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Close ;)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-4021018#post-3617174</guid>
				<title>Re: How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
				<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in#post-3617174</link>
				<description></description>
				<pubDate>Sat, 21 Oct 2017 05:09:56 +0000</pubDate>
				<wikidot:authorName>Battlesquid</wikidot:authorName>				<wikidot:authorUserId>2693561</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Assuming that the fraction is in a variable named <tt>frac</tt>:</p> <div class="code"> <pre><code>setMode(&quot;Exact/Approx&quot;,&quot;EXACT&quot;) string(frac)&amp;&quot;/1&quot;→str inString(str,&quot;/&quot;)→pos dim(str)-pos→pos2 expr(mid(str,1,pos-1))→num expr(right(str,pos2))→denom</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-4021018#post-3617139</guid>
				<title>Re: How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
				<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in#post-3617139</link>
				<description></description>
				<pubDate>Sat, 21 Oct 2017 03:48:18 +0000</pubDate>
				<wikidot:authorName>Step7</wikidot:authorName>				<wikidot:authorUserId>3404001</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Convert the number variable containing your fraction to a string. Use inString to return position of &quot;/&quot; in that string then isolate numerator and denominator using Left( and Right( based on the returned position. You may want to handle circumstance where input isn't a fraction. Shout if you need code example</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-4021018#post-3617080</guid>
				<title>Re: How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
				<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in#post-3617080</link>
				<description></description>
				<pubDate>Fri, 20 Oct 2017 23:56:50 +0000</pubDate>
				<wikidot:authorName>Myles_Zadok</wikidot:authorName>				<wikidot:authorUserId>2935702</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I don't know where <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/battlesquid" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=2693561&amp;amp;size=small&amp;amp;timestamp=1696963399" alt="Battlesquid" style="background-image:url(http://www.wikidot.com/userkarma.php?u=2693561)" /></a><a href="http://www.wikidot.com/user:info/battlesquid" >Battlesquid</a></span> is at, but he'll be around to help you shortly.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-4021018#post-3616830</guid>
				<title>How to get numerator/denominator of fractions seperately in 68k TI-BASIC?</title>
				<link>http://tibasicdev.wikidot.com/forum/t-4021018/how-to-get-numerator-denominator-of-fractions-seperately-in#post-3616830</link>
				<description></description>
				<pubDate>Fri, 20 Oct 2017 10:39:27 +0000</pubDate>
				<wikidot:authorName>LoganDark</wikidot:authorName>				<wikidot:authorUserId>3377445</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>For example, if I have the expression <tt>2/3</tt>, I want to get <tt>2</tt> and <tt>3</tt> as seperate numbers. Can I do that in 68k TI-BASIC?</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>