HPlogo HP-UX Reference > C

clog2(3M)

HP Integrity Server Only
HP-UX 11i Version 2: December 2007 Update
» 

Technical documentation

 » Table of Contents

 » Index

NAME

clog2(), clog2f(), clog2l(), clog2w(), clog2q() — complex base-2 logarithm functions

SYNOPSIS

#include <complex.h>

double complex clog2(double complex z);

float complex clog2f(float complex z);

long double complex clog2l(long double complex z);

extended complex clog2w(extended complex z);

quad complex clog2q(quad complex z);

DESCRIPTION

clog2() returns the complex base-2 logarithm of z in the range of a strip mathematically unbounded along the real axis and in the interval [-iPi/log(2) ,+iPi/log(2)] along the imaginary axis. There is a branch cut along the negative real axis.

clog2f() is a float complex version of clog2(); it takes a float complex argument and returns a float complex result.

clog2l() is a long double complex version of clog2(); it takes a long double complex argument and returns a long double complex result.

clog2w() is an extended complex version of clog2(); it takes an extended complex argument and returns an extended complex result.

clog2q() is equivalent to clog2l() on HP-UX systems.

USAGE

To use these functions, compile with the default -Ae option. To use clog2w() or clog2q(), compile with the -fpwidetypes option. Make sure your program includes <complex.h>. Link in the math library by specifying -lm on the compiler or linker command line.

RETURN VALUE

clog2(conj(z)) = conj(clog2(z)).

clog2(-0+i0) returns -Inf+iPi/log(2) and raises the divide-by-zero floating-point exception.

clog2(+0+i0) returns -Inf+i0 and raises the divide-by-zero floating-point exception.

clog2(x+iInf) returns +Inf+iPi/(2log(2)), for finite x.

clog2(x+iNaN) returns NaN+iNaN and optionally raises the invalid floating-point exception, for finite x.

clog2(-Inf+iy) returns +Inf+iPi/log(2), for finite positive-signed y.

clog2(+Inf+iy) returns +Inf+i0, for finite positive-signed y.

clog2(-Inf+iInf) returns +Inf+i3Pi/(4log(2)).

clog2(+Inf+iInf) returns +Inf+iPi/(4log(2)).

clog2(±Inf+iNaN) returns +Inf+iNaN.

clog2(NaN+iy) returns NaN+iNaN and optionally raises the invalid floating-point exception, for finite y.

clog2(NaN+iInf) returns +Inf+iNaN.

clog2(NaN+iNaN) returns NaN+iNaN.

ERRORS

No errors are defined.

STANDARDS CONFORMANCE

These functions are not specified by any standard.