pow

Computes x raised to the power y

Local Servers:nonblocking
Remote Servers:N/A
Classification:ANSI
Service:Mathematical Computation

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

The pow function returns the value of x raised to the power y. When the 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

The pow function computes x raised to the power y. 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

exp, log, sqrt

Example

  #include <math.h>  
  #include <stdio.h>  
  main ()  
  {  
       printf ("%f\n", pow (1.5, 2.5) );  
  }
  

produces the following:

  2.755676