Multiply Function [x]
08-03-2018, 09:27 AM (This post was last modified: 08-03-2018 09:32 AM by Gamo.)
Post: #1
 Gamo Senior Member Posts: 572 Joined: Dec 2016
Multiply Function [x]
I'm wondering what algorithm is use in calculator for the multiply function.

So I came up with the basic whole number multiplication by using the

7 x 4 = (7 + 7 + 7 + 7) = 28

Then I came up with this program to do the multiply function.
This program will multiply two whole numbers and do multiply with the first whole number with decimal like (21.75 x 5)

This program will not give correct result when multiply both decimal numbers like (10.2 x 11.2)

Example: 6903 x 103

6903 [ENTER] 103 [R/S] ---> 711009

Step can be reverse: 103 [ENTER] 6903 [R/S] ---> 711009

Program: Multiply Function using HP-12C
Code:
 01 STO 0 02 X<>Y 03 STO 1 04 RCL 0 05 INTG 06 X=0 ? 07 GTO 17 08 RCL 2 09 RCL 1 10   + 11 STO 2 12 RCL 0 13   1 14   - 15 STO 0 16 GTO 05 17 RCL 2 18   0 19 STO 2 20 X<>Y

Is there any other more efficient way to do this better and faster?
Anyone get a better solution so that this can do multiplication with both decimal numbers like (123.45 x 12.34)

Thank You

Gamo
 « Next Oldest | Next Newest »

 Messages In This Thread Multiply Function [x] - Gamo - 08-03-2018 09:27 AM RE: Multiply Function [x] - Massimo Gnerucci - 08-03-2018, 11:31 AM RE: Multiply Function [x] - Pekis - 08-03-2018, 01:04 PM RE: Multiply Function [x] - rprosperi - 08-03-2018, 01:13 PM RE: Multiply Function [x] - wynen - 08-03-2018, 01:07 PM RE: Multiply Function [x] - Dave Britten - 08-03-2018, 02:10 PM RE: Multiply Function [x] - Dieter - 08-03-2018, 02:40 PM RE: Multiply Function [x] - Thomas Klemm - 08-03-2018, 05:33 PM RE: Multiply Function [x] - Thomas Klemm - 08-03-2018, 06:45 PM RE: Multiply Function [x] - Leviset - 08-03-2018, 10:54 PM RE: Multiply Function [x] - ijabbott - 08-03-2018, 11:05 PM RE: Multiply Function [x] - Gamo - 08-04-2018, 01:41 AM RE: Multiply Function [x] - Gamo - 08-04-2018, 04:23 AM RE: Multiply Function [x] - Namir - 08-04-2018, 08:26 AM RE: Multiply Function [x] - Thomas Puettmann - 08-04-2018, 09:03 AM RE: Multiply Function [x] - brickviking - 08-05-2018, 03:12 AM RE: Multiply Function [x] - Gamo - 08-05-2018, 03:33 AM RE: Multiply Function [x] - Thomas Klemm - 08-05-2018, 04:07 PM

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