delorie.com/djgpp/doc/libc/libc_618.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

pow

Syntax

 
#include <math.h>

double pow(double x, double y);

Description

This function computes x^y, x raised to the power y.

Return Value

x raised to the power y. If the result overflows a double or underflows, errno is set to ERANGE. If y is NaN, the return value is NaN and errno is set to EDOM. If x and y are both 0, the return value is 1, but errno is set to EDOM. If y is a positive or a negative Infinity, the following results are returned, depending on the value of x:

x negative
the return value is NaN and errno is set to EDOM.

absolute value of x less than 1 and y is +Inf
absolute value of x greater than 1 and y is -Inf
the return value is zero.

absolute value of x less than 1 and y is -Inf
absolute value of x greater than 1 and y is +Inf
the return value is +Inf.

absolute value of x is 1
the return value is NaN and errno is set to EDOM.

Portability

ANSI/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004