amath  1.8.5
Simple command line calculator
clogb.c File Reference
#include "prim.h"
Include dependency graph for clogb.c:

Go to the source code of this file.

Functions

complex clogb (complex z)
 Base 2 logarithmic value of complex number. More...
 

Function Documentation

◆ clogb()

complex clogb ( complex  z)

Base 2 logarithmic value of complex number.

lb z = log(z) / log(2)

More info is available at Wikipedia:
https://wikipedia.org/wiki/Complex_logarithm

Definition at line 41 of file clogb.c.

References cdiv(), clog(), and cpack().

Referenced by ComplexNumber::Log2().

42 {
43  complex two = cpack(2.0, 0.0);
44  complex w = cdiv(clog(z), clog(two));
45  return w;
46 }
complex cdiv(complex y, complex z)
Division of two complex numbers.
Definition: prim.c:159
Definition: mathi.h:48
complex cpack(double x, double y)
Pack two real numbers into a complex number.
Definition: prim.c:68
static const double two
Definition: pow.c:67
complex clog(complex z)
Natural logarithm of a complex number.
Definition: clog.c:42
Here is the call graph for this function:
Here is the caller graph for this function: