1. Context
You need to monitor basic electrical parameters of Your MCC and for that You are going to use SE Power Meter PM800. Among all data that You are going to display on Your HMI, there is a Power Factor. In the official SE document "PM800-User_Guide.pdf" on page 80, it is explained how Power Factor is stored in 16 bit register.

Power Factor 15th bit carries information about Leading and Lagging which You will represent by positive or negative sign.
2. Objectives
Transform PM800 Power Factor Register to a value of range: -1.000 to 1.000 for displaying it on HMI.
3. Analysis
3.1 Examples
Let's have a look at some examples in Table 1. Keep in mind that if register has a negative value, 32768 needs to be added to get absolute value of Power Factor. The last column is the final value to be displayed.

Table 1 - PM800 Power Factor register value and its interpretation
3.2 Script
Usually, modern HMIs are equipped with some sort of tool that allows You to write a script (or peace of code) and save its result in a register that will displayed. Writing a script is the first, natural idea for this task. Here is a simple example of a conversion function:
real PM800_TO_REAL(int PM800_REG) {
real result = 0.0;
if (PM800_REG < 0) {
result = -1 * (PM800_REG + 32768);
} else {
esult = PM800_REG;
}
return result/1000;
}
The thing is, it is not always possible to write a script. Some of HMIs are limited in terms of functionality. They can process an expression but it is not possible to use IF ELSE statement. Fortunately expressions usually accept all the mathematical and boolean operators.

Figure 1 - ARC Informatique PcVue register display
So our main question is: how to transform our script into mathematical expression?
3.3 Mathematical expression
We need to get an absolute value of the register and manage the sign according to 15th bit.
Getting absolute value is pretty easy. We just put a mask for the first 10 bits.
How about the sign? We are using 15th bit of the register as a sign and it will be easier to think about it as a value 0 or 1. Let's shift our register 15 bits to the right.
Now, it all comes down to the question: what mathematical expression we may use to transform {0, 1} into {1, -1}? We can use exponentiation.
So the final expression to transform Power Factor Register into a value from a range of -1.000 to 1.000 would look like this:
4. Summary
I do not know why SE didn't use that simple expression inside PM800. It would be easier for automation engineers to use signed integer instead. They would have less documentation to write and we would have less job to do. Nevertheless, I consider this case as a great brain exercise. Sometimes, it is more convenient to use mathematical rather than programming approach.