Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!mintaka!ai-lab!rice-chex!bson From: bson@rice-chex.ai.mit.edu (Jan Brittenson) Newsgroups: comp.sys.handhelds Subject: Re: DEC2FRAC-II for the HP48SX Message-ID: <14476@life.ai.mit.edu> Date: 30 Mar 91 21:48:22 GMT References: <12222 <1991Mar30.191031.26274@en.ecn.purdue.edu> Sender: news@ai.mit.edu Organization: nil Lines: 47 In a posting of [30 Mar 91 19:10:31 GMT] wscott@en.ecn.purdue.edu (Wayne H Scott) writes: > This program handles: > real numbers > complex numbers > equations > TAGGED objects > lists > and any combination of the above So all we have to do now, is: 1. Rewrite Wayne's and Joe's programs in system RPL. 2. Write +, -, INV, SIN, etc, functions to replace the keyboard equivalents. Basically, they should check to see whether one of their arguments is an algebraic - if not, just chain to the standard function. Otherwise, we apply the standard operator, EVAL, and DO->Q. 3. Appropriate system flag -54, conveniently among the "Display Format Flags" to mean "fractional display." If the flag isn't set, just do the standard old thing, regardless of arguments. 4. Write a vectored ENTER function to automatically DO->Q on all input, if flag -54 is set, otherwise it should do nothing. 5. Get the "maximum denominator" parameter from a 'FRACpar' variable instead of the stack. 6. Add code to handle fractional units imposed by the brain damage of the English unit system - Joe's wish list seems like a good starting point. 7. Package it all in a library. Voila' - we have an exceptionally useful fractional library. Perhaps the most useful one ever put in a calculator? I think just using a "display format" is the way to go, rather than trying to implement fractions symbolically. -- Jan Brittenson bson@ai.mit.edu