(42) Feet inches fractions
|
07-11-2021, 08:31 PM
(This post was last modified: 06-22-2022 06:43 PM by DMaier.)
Post: #1
|
|||
|
|||
(42) Feet inches fractions
This code takes decimal inches, e.g., 14.25 in X and returns the following in Alpha:
The maximum denominator, which should be a power of 2, is assumed to be set in variable DEN (store 16 in DEN if you don't want anything smaller than sixteenths, for example). Note that the code rounds to the nearest fraction. The code uses flag 82 internally and doesn't preserve the stack (but see suggested modification in comments). EDIT (2022-06-22): Updated to remove a serious bug in handling non-integer values that rounded to integers. Sample output (DEN=8, flag 1 clear): Code:
Code:
|
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(42) Feet inches fractions - DMaier - 07-11-2021 08:31 PM
RE: (42) Feet inches fractions - DMaier - 06-22-2022, 07:47 PM
|
User(s) browsing this thread: 1 Guest(s)