LabWindows/CVI

Content Type
Programming Language
Current manual

pow

pow

double pow (double inputValue, double power);

Purpose

Raises the input value to the designated power and returns the result. A negative input value with a non-integer power value causes a domain error. An input value of zero with a power that is less than or equal to zero will also cause a domain error. If the magnitudes of the arguments cause the function to return a value that cannot be represented as a double, they may cause a range error.

Parameters

Input
Name Type Description
inputValue double Contains the value that is raised to the designated power.
power double Contains the power to which inputValue is raised.

Return Value

Name Type Description
result double Contains the resulting value the function. The returned value is defined by the following:

result = inputValue^power

  • If inputValue is less than zero and power is not integral, pow returns NaN and sets errno to EDOM.
  • If inputValue is equal to zero and power is less than zero, pow returns Inf and sets errno to EDOM.
  • If the magnitude of inputValue and power are such that the computed value cannot be represented as a double, pow sets errno to ERANGE. If the computed value would be greater than any value that can be represented as a double, pow returns Inf.

Additional Information

Library: ANSI C Library

Include file: ansi_c.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later

Example

Refer to userint\imagedit.cws for an example of using the pow function.

Was this information helpful?