HP C A.06.05 Reference Manual
Expressions and Operators
Arithmetic Operators (+, -, *, /, %)
Chapter 5 85
As required by the ANSI/ISO C standard, HP C supports the following relationship between
the remainder and division operators:
a equals a%b + (a/b) * b for any integer values of a and b
The result of a division or modulo division is undefined if the right operand is 0.
The sign reversal or unary minus operator (-) multiplies its sole operand by -1. For example,
if x is an integer with the value -8, then -x evaluates to 8.
The result of the identity or unary plus operator (+) is simply the value of the operand.
Refer to “Operator Precedence” on page 135 for information about how these and other
operators evaluate with respect to each other.