# HP Forums

Full Version: (12C Platinum) Temperature Converter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Program to convert temperature between (°C <--> °F)

Procedure: FIX 1

0 for (°C --> °F)
1 for (°F --> °C)

37°C
0 ENTER 37 [R/S] display 98.6 // Answer °F

212°F
1 ENTER 212 [R/S] display 100.0 // Answer °C

------------------------------------------------------

Program: (ALG Mode)
Code:
``` STO 0 X<>Y X=0 GTO 015 RCL 0 - 32 x 5 ÷ 9 = GTO 000 RCL 0 x 9 ÷ 5 + 32 =```

Gamo
(12-26-2018 11:07 AM)Gamo Wrote: [ -> ]Program: (ALG Mode)
Code:
```STO 0 X<>Y X=0 GTO 015 RCL 0 - 32 x 5 ÷ 9 = GTO 000 RCL 0 x 9 ÷ 5 + 32 =```

- Why does the program require a data register? Why don't you simply recall the input with another X<>Y ?

- The °F to °C conversion calculates "<input> – 32 x 5 / 9". Any decent algebraic calculator I know of would do the multiplication/division before the subtraction. Does the 12C Platinum really ignore this? So would "1+2x3=" really return 9 instead of 7 ? If the resul is (correctly) 7 the program needs parantheses or an additional "=".

Edit: reading the 12C Platinum manual, I just realized that indeed this calculator does not calculate the multiplication and division first. It simply executes the operations from left to right. Unbelievable... #-(

Dieter
(12-26-2018 04:05 PM)Dieter Wrote: [ -> ]Edit: reading the 12C Platinum manual, I just realized that indeed this calculator does not calculate the multiplication and division first. It simply executes the operations from left to right. Unbelievable... #-(

I noticed that too

BTW, I prefer using -40 C = -40 F, to avoid remembering offset of ±32
With chained calculator:

C→F : + 40 × 1.8 - 40 =
F→C : + 40 ÷ 1.8 - 40 =
(12-26-2018 04:05 PM)Dieter Wrote: [ -> ]Edit: reading the 12C Platinum manual, I just realized that indeed this calculator does not calculate the multiplication and division first. It simply executes the operations from left to right. Unbelievable... #-(

Also known as "chain mode". It seems quite common for financial calculators. The 17BII and 19BII work in the same way when set to ALG mode (i.e. it is really a chain mode), except when entering equations in the solver, where the usual order of operations is followed!

The 20b and 30b support RPN, Chain, and Algebraic modes. The 10bIi+ supports Chain and Algebraic modes.
Thanks for the review to all.

One thing I like about ALG mode that it is always do operation from left to right
as Dieter mention.
This kind of operation is sometime less confuse to operate but
of cause that use a lot of programing steps. No wonder that 12C Platinum
have 400 maximum program steps to spare.

Gamo
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :