pow

Computes x raised to the power y.

Library:LibC
Classification:ANSI
Service:Math

Syntax

  #include <math.h> 
   
  double pow (
     double   x,   
     double   y);
  

Parameters

x

(IN) Specifies the argument to be raised to the power y.

y

(IN) Specifies the integral power.

Return Values

If successful, returns the value of x raised to the power y.

When an argument is outside the permissible range, errno is set and matherr is called. Unless the function is replaced, matherr prints a diagnostic message using the stderr stream.

Remarks

A domain error occurs if x is zero and y is less than or equal to 0, or if x is negative and y is not an integer. A range error can occur.

See Also