TI 83/84
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   Dev Hardware ForumsSOFTWARETI 83/84

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Hardware Forums Sponsor:
  Trader Rating: 0 · #1  
Old February 16th, 2008, 10:52 AM
SilverDragon's Avatar
SilverDragon SilverDragon is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 9 SilverDragon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 18 m 34 sec
Reputation Power: 0
How to use Output to display value in fraction

I want to display some quote/string and some values(fraction) in one line, how can i do

something like this
"+"{a quote} {value of A^C>Frac} "X^" {value of 2C}

currently my problems is that when i use "output", i can put several elements in a line, but then ">Frac" cant be used, if i use "Disp"(which enable me to use >Frac) then i cant place all the elements in a same line.

can anyone help me, i have been using my gc for one week only.

thx

Reply With Quote
  Trader Rating: 0 · #2  
Old April 2nd, 2008, 12:33 PM
MrLarkins's Avatar
MrLarkins MrLarkins is offline
The HS Math Teacher
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Oct 2007
Location: Central Arkansas
Posts: 46 MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 8 h 12 m 20 sec
Reputation Power: 2
Send a message via ICQ to MrLarkins
Quote:
Originally Posted by SilverDragon
I want to display some quote/string and some values(fraction) in one line, how can i do

something like this
"+"{a quote} {value of A^C>Frac} "X^" {value of 2C}

currently my problems is that when i use "output", i can put several elements in a line, but then ">Frac" cant be used, if i use "Disp"(which enable me to use >Frac) then i cant place all the elements in a same line.

can anyone help me, i have been using my gc for one week only.

thx


hmm, watch the process, this may help:
Code:
.75->A
.75*100->A
gcd(A,100)->B
A/B->C
100/B->D
Output(1,1,C)
Output(1,3,"/")
Output(1,5,D) 

i left space so that it displays "3 / 4" instead of "3/4"...so that double digits are allowed. if you think you need triple digist you can give more space. if you want it to float, then you need more code.

but do you understand the math of finding the numerator and denominator?

Reply With Quote
  Trader Rating: 0 · #3  
Old April 2nd, 2008, 12:57 PM
MrLarkins's Avatar
MrLarkins MrLarkins is offline
The HS Math Teacher
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Oct 2007
Location: Central Arkansas
Posts: 46 MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 8 h 12 m 20 sec
Reputation Power: 2
Send a message via ICQ to MrLarkins
fixed it up a bit and made it fancy...now it floats
Code:
Prompt A     //decimal to convert to fraction
A*10000->A
gcd(A,10000)->B
A/B->C
10000/B->D
If C/10<1
Then
1->Z
Goto 99
Else
If C/100<1
Then
2->Z
Goto 99
Else
If C/1000<1
Then
3->Z
Goto 99
Else
4->Z      //Should be enough space
End
Lbl 99
ClrHome
Output(1,1,C)
Output(1,1+Z,"/")
Output(1,2+Z,D)

and that will handle a 4 digit numerator with any size denominator.

enjoy!

Last edited by MrLarkins : April 14th, 2008 at 01:39 PM.

Reply With Quote
  Trader Rating: 0 · #4  
Old April 14th, 2008, 12:34 PM
zilchonum zilchonum is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 35 zilchonum User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 53 m 31 sec
Reputation Power: 1
Improvement

I like that solution, but it would be easier to do "int(log(x))+1" instead of checking to find the number of digits.

Reply With Quote
  Trader Rating: 0 · #5  
Old April 14th, 2008, 12:43 PM
Jagraffamel's Avatar
Jagraffamel Jagraffamel is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Location: Small Town America.
Posts: 87 Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Day 1 h 6 m 53 sec
Reputation Power: 440
Send a message via MSN to Jagraffamel
The only person who knows anything on here is zilchonum, I wrote one that makes ANY decimal (so long as it isn't irrational...) that only has about 16 lines...only takes up 160 bytes...so...

Reply With Quote
  Trader Rating: 0 · #6  
Old April 14th, 2008, 01:38 PM
MrLarkins's Avatar
MrLarkins MrLarkins is offline
The HS Math Teacher
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Oct 2007
Location: Central Arkansas
Posts: 46 MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 8 h 12 m 20 sec
Reputation Power: 2
Send a message via ICQ to MrLarkins
Quote:
Originally Posted by zilchonum
I like that solution, but it would be easier to do "int(log(x))+1" instead of checking to find the number of digits.


very nice digit finder...eloquent, i've never seen that before.

but i incorporated it into the program

Code:
Prompt A     //decimal to convert to fraction
A*10000000->A
gcd(A,10000000)->B
A/B->C
10000000/B->D
int(log(C))+1->Z
Lbl 99
ClrHome
Output(1,1,C)
Output(1,1+Z,"/")
Output(1,2+Z,D)


that cut the code quite a bit. thanks.

Reply With Quote
  Trader Rating: 0 · #7  
Old April 14th, 2008, 04:13 PM
Jagraffamel's Avatar
Jagraffamel Jagraffamel is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Location: Small Town America.
Posts: 87 Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Day 1 h 6 m 53 sec
Reputation Power: 440
Send a message via MSN to Jagraffamel
What if you have the number .001020102010201020102010201020...?

Reply With Quote
  Trader Rating: 0 · #8  
Old April 15th, 2008, 07:51 AM
MrLarkins's Avatar
MrLarkins MrLarkins is offline
The HS Math Teacher
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Oct 2007
Location: Central Arkansas
Posts: 46 MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 8 h 12 m 20 sec
Reputation Power: 2
Send a message via ICQ to MrLarkins
how likely is that, i mean get serious...even the most sophisticated calculators have a digit limit of 8 or 9

even the TI84's built in >FRAC feature won't convert YOUR decimal to a fraction.

be helpful instead of a nuisance

Last edited by MrLarkins : April 15th, 2008 at 07:56 AM.

Reply With Quote
  Trader Rating: 0 · #9  
Old April 15th, 2008, 09:22 PM
Jagraffamel's Avatar
Jagraffamel Jagraffamel is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Location: Small Town America.
Posts: 87 Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Day 1 h 6 m 53 sec
Reputation Power: 440
Send a message via MSN to Jagraffamel
No, I mean that as a repeating decimal...

Or how about if it is .11111111111111111111111111111 or the fraction 1/9, it isn't going to be able to calculate that very well.

Reply With Quote
  Trader Rating: 0 · #10  
Old April 16th, 2008, 08:15 AM
zilchonum zilchonum is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 35 zilchonum User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 53 m 31 sec
Reputation Power: 1
More of a solution

My friend actually made a program like this. I helped him... what we did was multiply the number by 10, in a loop, then we checked if the fractional part cancelled out, like this:

.010101->N
N->T
for(A,1,10)
10T->T
if fPart(T-N)<(10^-A)
Then
A->R:10->A
End
End

Basically, you can take R (the number of repeated digits) and do something with that to format the fraction. Jaggraffamel should know more about that...

I'm not sure if that's the actual code (or if it works as is) but that's the general idea... hope it's useful.

Reply With Quote
  Trader Rating: 0 · #11  
Old April 16th, 2008, 11:54 AM
MrLarkins's Avatar
MrLarkins MrLarkins is offline
The HS Math Teacher
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Oct 2007
Location: Central Arkansas
Posts: 46 MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 8 h 12 m 20 sec
Reputation Power: 2
Send a message via ICQ to MrLarkins
Quote:
Originally Posted by zilchonum
My friend actually made a program like this. I helped him... what we did was multiply the number by 10, in a loop, then we checked if the fractional part cancelled out, like this:

.010101->N
N->T
for(A,1,10)
10T->T
if fPart(T-N)<(10^-A)
Then
A->R:10->A
End
End

Basically, you can take R (the number of repeated digits) and do something with that to format the fraction. Jaggraffamel should know more about that...

I'm not sure if that's the actual code (or if it works as is) but that's the general idea... hope it's useful.


that's very nice, i'd would have never thought of that....but you got a parathesis in the wrong spot.

Code:
Prompt->N
N->T
for(A,1,10)
10T->T
if fPart(T)-N<(10^-A)
Then
A->R:10->A
End
End

but how to integrate that into a program that does both terminating and repeating decimels...and then also decimals that have a non-repeating part before the repeating part, like .00102010201020102...

hmmm, more thinking.

Last edited by MrLarkins : April 16th, 2008 at 11:56 AM.

Reply With Quote
  Trader Rating: 0 · #12  
Old April 16th, 2008, 03:23 PM
Jagraffamel's Avatar
Jagraffamel Jagraffamel is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Location: Small Town America.
Posts: 87 Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Day 1 h 6 m 53 sec
Reputation Power: 440
Send a message via MSN to Jagraffamel
It's already done. Would you like me to just show you, or allow you think for a while. It's a very simple program. I took a slightly different approach. The method you are using now definitely won't work thought. You will have to use -log( function to make it work out properly.

Reply With Quote
  Trader Rating: 0 · #13  
Old April 16th, 2008, 03:30 PM
MrLarkins's Avatar
MrLarkins MrLarkins is offline
The HS Math Teacher
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Oct 2007
Location: Central Arkansas
Posts: 46 MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level)MrLarkins User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 8 h 12 m 20 sec
Reputation Power: 2
Send a message via ICQ to MrLarkins
let me think for a day, then post it.

thanks

Reply With Quote
  Trader Rating: 0 · #14  
Old April 17th, 2008, 12:29 PM
zilchonum zilchonum is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 35 zilchonum User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 53 m 31 sec
Reputation Power: 1
...

Quote:
Originally Posted by Jagraffamel
It's already done. Would you like me to just show you, or allow you think for a while. It's a very simple program. I took a slightly different approach. The method you are using now definitely won't work thought. You will have to use -log( function to make it work out properly.


Well, theoretically, it would. You see, the only decimals that repeat have denominators that end in 1, 3, 7, and 9. Google 'Vedic Mathematics' and look for "by one more than the one before" to see what I mean. You could probably reverse the division alg (from Vedic Math) to come out with a workable fraction (with a denominator that ends in 9), which could then be reduced through factoring. All the other denominators don't repeat, however, so there is no problem, see?

If you don't quite understand, just say so. I'll try to show the act