Topic: DMD0121 Math Raise to a Power Operator |
||||||||||||||||||||||||
|
||||||||||||||||||||||||
The Math Raise to a Power operator ( ** ) will calculate the result of a base raised to the power of an exponent. The result of this calculation will always be a Real (floating point) value and should be placed in a Real memory location to preserve the fractional portion. This is especially important if the exponent is negative or if the exponent is a Real value,
Any value raised to the 0 power is 1. The value 0 raised to any power is 0. Note: 0 raised to the 0 power is 1.
The base and exponent can be any mix of signed integers, unsigned integers, real (floating point) numbers or discrete values. They can be any numeric or discrete memory location or any numeric or discrete structure member.
Traditional math precedence rules are used to solve the math expression. The use of parentheses to remove any ambiguity in the processing order is encouraged.
Refer to the examples below:
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
See Also:
Raise to a Power
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
Related Topics:
|
||||||||||||||||||||||||
|