Boost logo

Boost :

From: Ross Smith (r-smith_at_[hidden])
Date: 2003-04-16 15:10:48

On Thursday, 17 April 2003 02:29, Hubert Holin wrote:
> Then perhaps cbrt and pow (though I would like to know the
> precise C99 wording to see what people expect from them, say as to
> the range of the integer exponent for pow or the behaviour of cbrt on
> negative reals (that ought to be obvious, but then again...)).

| The cbrt functions
| Synopsis
| #include <math.h>
| double cbrt(double x);
| float cbrtf(float x);
| long double cbrtl(long double x);
| Description
| The cbrt functions compute the real cube root of x.
| Returns
| 1/3
| The cbrt functions return x .

| The pow functions
| Synopsis
| #include <math.h>
| double pow(double x, double y);
| float powf(float x, float y);
| long double powl(long double x, long double y);
| Description
| The pow functions compute x raised to the power y. A domain error
| occurs if x is finite and negative and y is finite and not an
| integer value. A domain error may occur if x is zero and y is less
| than or equal to zero. A range error may occur.
| Returns
| y
| The pow functions return x .

C99 has no separate integer-exponent version of pow(), that one is
purely a C++ artifact.

Ross Smith ......... r-smith_at_[hidden] ......... Auckland, New Zealand
    Our landscape raped by different armies
    Soldier-slaves who have no faces
    Control our ways and lives completely
    Our minds are torn, time left its traces
        -- L'Ame Immortelle

Boost list run by bdawes at, gregod at, cpdaniel at, john at