(12C) Decimal to Fraction
|
08-09-2018, 07:46 AM
Post: #27
|
|||
|
|||
RE: (12C) Decimal to Fraction
(08-09-2018 12:51 AM)Gamo Wrote: This routine is to check for the FIX setting. I cannot see how this may be related to the topic of this thread, but anyway it's a nice little utility that you may post in a separate thread. The program calculates round(1/3) – 1/3. This is always negative, so there is no need for an ABS via ENTER × √x: a CHS will do. Or simply reverse the order: 1/3 – round(1/3) is always positive. I assume that after this usually the base-10-logarithm is calculated, which the 12C does not offer. But instead of dividing the natural log by ln 10 (which is slow) here any value between 2,193 and 2,436 may be used. For instance √5 = 2,236. This is faster than a log and saves one step. So here is an updated version. I added an ENTER at the start, just to be sure... Code: 01 ENTER FIX 4 [R/S] => 4,0000 Re. line 07/08: LN CHS may by a tiiiny bit faster. ;-) Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)