Post Reply 
(12C) Decimal to Fraction
08-11-2018, 10:05 AM (This post was last modified: 05-15-2022 08:46 AM by Thomas Klemm.)
Post: #46
RE: (12C) Decimal to Fraction
(08-09-2018 10:15 PM)Albert Chan Wrote:  1. hi = lo + 1 instead of 1/0 (infinity), thus saved 1 iteration

Code:
n2, d2 = n1+1, 1        # hi = lo + 1

(08-10-2018 07:06 PM)Dieter Wrote:  Here is a revised version:
Code:
01 STO 0
02 INTG
03 STO 1
04 1
05 STO 2
06 STO 3
07 RCL 0
08 FRAC
09 x=0?
10 GTO 62
11 Clx
12 STO 4
(…)

Thus we can still save an iteration using:
Code:
01 STO 0
02 INTG
03 STO 1
04 1
05 STO 2
06 STO 4
07 +
08 STO 3
09 RCL 0
10 FRAC
11 x=0?
12 GTO 62
(…)

Best regards
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(12C) Decimal to Fraction - Gamo - 08-06-2018, 12:33 PM
RE: (12C) Decimal to Fraction - Dieter - 08-06-2018, 08:44 PM
RE: (12C) Decimal to Fraction - Dieter - 08-07-2018, 07:29 AM
RE: (12C) Decimal to Fraction - Dieter - 08-07-2018, 01:02 PM
RE: (12C) Decimal to Fraction - Dieter - 08-07-2018, 11:38 AM
RE: (12C) Decimal to Fraction - Gamo - 08-07-2018, 09:29 AM
RE: (12C) Decimal to Fraction - Joe Horn - 08-07-2018, 06:28 PM
RE: (12C) Decimal to Fraction - Dieter - 08-07-2018, 07:10 PM
RE: (12C) Decimal to Fraction - Joe Horn - 08-08-2018, 12:28 AM
RE: (12C) Decimal to Fraction - Dieter - 08-08-2018, 07:04 PM
RE: (12C) Decimal to Fraction - Dieter - 08-09-2018, 09:27 AM
RE: (12C) Decimal to Fraction - Dieter - 08-08-2018, 09:44 PM
RE: (12C) Decimal to Fraction - Gamo - 08-09-2018, 12:51 AM
RE: (12C) Decimal to Fraction - Dieter - 08-09-2018, 07:46 AM
RE: (12C) Decimal to Fraction - Dieter - 08-09-2018, 08:09 AM
RE: (12C) Decimal to Fraction - Gamo - 08-09-2018, 09:16 AM
RE: (12C) Decimal to Fraction - Dieter - 08-09-2018, 10:30 AM
RE: (12C) Decimal to Fraction - Dieter - 08-10-2018, 12:28 PM
RE: (12C) Decimal to Fraction - Gamo - 05-07-2019, 01:44 AM
RE: (12C) Decimal to Fraction - Dieter - 08-10-2018, 07:06 PM
RE: (12C) Decimal to Fraction - Thomas Klemm - 08-11-2018 10:05 AM



User(s) browsing this thread: 1 Guest(s)