pow(), powf()

compute x to the power of y 

Function


SYNOPSIS

#include <math.h>

double pow(double x, double y)

float powf(float x, float y)


DESCRIPTION

The pow() function computes x raised to the power y. If x is negative, y must be an integer value.

To check for errors, set errno to 0 before calling pow(). If errno is non-zero on return, or the return value is NaN, an error has occurred.

The powf() function is a single-precision version of pow().


PARAMETERS

x 

Is the mantissa.

y 

Is the exponent.


RETURN VALUES

The pow() function returns the value of x**y.

If x is 0.0 and y is 0.0, 1.0 is returned unless in SVID mode, in which case 0.0 is returned and matherr() is called.

If x is 0.0 and y is negative, then:

If x is NaN and y is zero, then:

If y is NaN or y is non-zero and x is NaN, NaN is returned.

If y is 0.0 and x is NaN, then:

If x is negative and y is a non-integer, then:

If it overflows, then:

If it underflows, 0.0 is returned and:


CONFORMANCE

pow(): ANSI/ISO 9899-1990

powf(): PTC MKS Toolkit UNIX APIs extension


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
exp(), log(), log10(), math(), sqrt()


PTC MKS Toolkit 10.4 Documentation Build 39.