01-08-2019, 06:43 AM

This little program steps is use for [ABS] the "Absolute Value" function.

This program steps only use "Test Function" while other method use

Arithmetic calculations to get the Absolute Value.

Here is the Arithmetic method: [X^2] [√X]

Test Function method: 0 [X<>Y] [X≤Y] [CHS]

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

Example: Program to calculate + or - [√X] using ABS

100 [R/S] display 10

100 [CHS] [R/S] display 10

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

Program: Calculate [√X] using ABS to only return positive value

Remark: This routine also work on HP-12C

Gamo

This program steps only use "Test Function" while other method use

Arithmetic calculations to get the Absolute Value.

Here is the Arithmetic method: [X^2] [√X]

Test Function method: 0 [X<>Y] [X≤Y] [CHS]

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

Example: Program to calculate + or - [√X] using ABS

100 [R/S] display 10

100 [CHS] [R/S] display 10

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

Program: Calculate [√X] using ABS to only return positive value

Code:

0

X<>Y

X≤Y

CHS

√X

Remark: This routine also work on HP-12C

Gamo