(12C Platinum) Arithmetic with Fractions
|
09-24-2018, 09:35 AM
(This post was last modified: 12-02-2018 02:16 AM by Gamo.)
Post: #1
|
|||
|
|||
(12C Platinum) Arithmetic with Fractions
Program to Add Subtract Multiply and Divide Fractions.
Result is simplify to lowest term and convert to Mixed Fraction. All the procedure is the same from previous post except "When multiply or divide fraction first must press GTO 072 each time." Add or Subtract Fractions with separate program for Multiply and Divide Fraction. http://www.hpmuseum.org/forum/thread-11410.html This program is the update version from the 12C Add Subtract Fractions with Multiply and Divide. Program included all arithmetic because HP-12C Platinum came with 400 program lines that make it possible where the 12C need to break up in two separate programs. Program: For Multiply and Divide First press GTO 072 on run mode. 001 STO 4 // Add or Subtract Fractions 002 Rv 003 STO 3 004 Rv 005 STO 2 006 Rv 007 STO 1 008 RCL 1 009 RCL 4 010 x 011 RCL 2 012 RCL 3 013 x 014 + 015 STO 6 016 RCL 2 017 RCL 4 018 x 019 STO 5 020 X≤Y // GCD routines 021 X<>Y 022 STO 8 023 X<>Y 024 STO 0 025 RCL 8 026 RCL 8 027 RCL 0 028 ÷ 029 INTG 030 RCL 0 031 x 032 - 033 X=0 034 GTO 040 035 X<>Y 036 STO 8 037 X<>Y 038 STO 0 039 GTO 025 040 RCL 0 041 STO 7 // GCD result use for Lowest Term Fraction 042 RCL 5 043 RCL 7 044 ÷ 045 RCL 6 046 RCL 7 047 ÷ 048 R/S // Stop and Ready for Mixed Fraction ----------------------------------------------------------- 049 STO 0 050 X<>Y 051 X<>Y 052 ÷ 053 LSTx 054 X<>Y 055 ENTER 056 FRAC 057 X<>Y 058 INTG 059 Rv 060 x 061 EEX 062 4 063 ÷ 064 Rv 065 Rv 066 Rv 067 + 068 FIX 4 069 RCL 0 070 X<>Y 071 GTO 000 // Program end here ----------------------------------------------------- 072 STO 4 // Start Multiply or Divide fraction 073 Rv 074 STO 3 075 Rv 076 STO 2 077 Rv 078 STO 1 079 RCL 4 080 1 081 X<>Y 082 X≤Y // Test for when input is negative integer then run Fraction Division 083 GTO 093 084 RCL 1 085 RCL 3 086 x 087 STO 5 088 RCL 2 089 RCL 4 090 x 091 STO 6 092 GTO 104 093 RCL 4 094 CHS 095 STO 4 096 RCL 1 097 RCL 4 098 x 099 STO 5 100 RCL 2 101 RCL 3 102 x 103 STO 6 104 RCL 6 105 RCL 5 106 X≤Y // GCD routines 107 X<>Y 108 STO 8 109 X<>Y 110 STO 0 111 RCL 8 112 RCL 8 113 RCL 0 114 ÷ 115 INTG 116 RCL 0 117 x 118 - 119 X=0 120 GTO 126 121 X<>Y 122 STO 8 123 X<>Y 124 STO 0 125 GTO 111 126 RCL 0 127 STO 7 // GCD result use for Lowest Term Fraction 128 RCL 6 129 RCL 7 130 ÷ 131 RCL 5 132 RCL 7 133 ÷ 134 GTO 048 // Go to Mixed Fraction ----------------------------------------------------------- Gamo |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)