|
Dynamic Complex Library 1.0.0
Reference-counted arbitrary precision complex number library (MIT OR Unlicense)
|
Functions for floating-point complex numbers. More...
Functions | |
| dc_complex_double | dc_double_from_doubles (double real, double imag) |
| Create a floating-point complex number from real and imaginary parts. | |
| dc_complex_double | dc_double_from_polar (double magnitude, double angle) |
| Create a floating-point complex number from polar coordinates. | |
| dc_complex_double | dc_double_zero (void) |
| Get the floating-point complex zero (0.0 + 0.0i) | |
| dc_complex_double | dc_double_one (void) |
| Get the floating-point complex one (1.0 + 0.0i) | |
| dc_complex_double | dc_double_i (void) |
| Get the floating-point complex i (0.0 + 1.0i) | |
| dc_complex_double | dc_double_neg_one (void) |
| Get the floating-point complex -1 (-1.0 + 0.0i) | |
| dc_complex_double | dc_double_neg_i (void) |
| Get the floating-point complex -i (0.0 + -1.0i) | |
| dc_complex_double | dc_double_retain (dc_complex_double c) |
| Increment reference count and return the same object. | |
| void | dc_double_release (dc_complex_double *c) |
| Decrement reference count and possibly free memory. | |
| dc_complex_double | dc_double_copy (dc_complex_double c) |
| Create a new copy with reference count 1. | |
| dc_complex_double | dc_double_add (dc_complex_double a, dc_complex_double b) |
| Add two floating-point complex numbers. | |
| dc_complex_double | dc_double_sub (dc_complex_double a, dc_complex_double b) |
| Subtract two floating-point complex numbers. | |
| dc_complex_double | dc_double_mul (dc_complex_double a, dc_complex_double b) |
| Multiply two floating-point complex numbers. | |
| dc_complex_double | dc_double_div (dc_complex_double a, dc_complex_double b) |
| Divide two floating-point complex numbers. | |
| dc_complex_double | dc_double_negate (dc_complex_double c) |
| Negate a floating-point complex number. | |
| dc_complex_double | dc_double_conj (dc_complex_double c) |
| Complex conjugate of a floating-point complex number. | |
| dc_complex_double | dc_double_exp (dc_complex_double c) |
| Complex exponential function. | |
| dc_complex_double | dc_double_log (dc_complex_double c) |
| Complex natural logarithm. | |
| dc_complex_double | dc_double_pow (dc_complex_double a, dc_complex_double b) |
| Complex power function. | |
| dc_complex_double | dc_double_sqrt (dc_complex_double c) |
| Complex square root. | |
| dc_complex_double | dc_double_sin (dc_complex_double c) |
| Complex sine function. | |
| dc_complex_double | dc_double_cos (dc_complex_double c) |
| Complex cosine function. | |
| dc_complex_double | dc_double_tan (dc_complex_double c) |
| Complex tangent function. | |
| dc_complex_double | dc_double_sinh (dc_complex_double c) |
| Complex hyperbolic sine function. | |
| dc_complex_double | dc_double_cosh (dc_complex_double c) |
| Complex hyperbolic cosine function. | |
| dc_complex_double | dc_double_tanh (dc_complex_double c) |
| Complex hyperbolic tangent function. | |
| double | dc_double_real (dc_complex_double c) |
| Get the real part of a floating-point complex number. | |
| double | dc_double_imag (dc_complex_double c) |
| Get the imaginary part of a floating-point complex number. | |
| double | dc_double_abs (dc_complex_double c) |
| Get the absolute value (magnitude) of a complex number. | |
| double | dc_double_arg (dc_complex_double c) |
| Get the argument (phase angle) of a complex number. | |
| bool | dc_double_eq (dc_complex_double a, dc_complex_double b) |
| Test if two floating-point complex numbers are equal. | |
| bool | dc_double_is_zero (dc_complex_double c) |
| Test if a floating-point complex number is zero. | |
| bool | dc_double_is_real (dc_complex_double c) |
| Test if a floating-point complex number is real (imaginary part is zero) | |
| bool | dc_double_is_imag (dc_complex_double c) |
| Test if a floating-point complex number is purely imaginary (real part is zero) | |
| bool | dc_double_is_nan (dc_complex_double c) |
| Test if a floating-point complex number contains NaN. | |
| bool | dc_double_is_inf (dc_complex_double c) |
| Test if a floating-point complex number contains infinity. | |
| char * | dc_double_to_string (dc_complex_double c) |
| Convert floating-point complex number to mathematical string representation. | |
Functions for floating-point complex numbers.
|
extern |
Get the absolute value (magnitude) of a complex number.
| c | The complex number (must not be NULL) |
|
extern |
Add two floating-point complex numbers.
| a | First operand (must not be NULL) |
| b | Second operand (must not be NULL) |
|
extern |
Get the argument (phase angle) of a complex number.
| c | The complex number (must not be NULL) |
|
extern |
Complex conjugate of a floating-point complex number.
| c | The operand (must not be NULL) |
|
extern |
Create a new copy with reference count 1.
| c | The complex number to copy (must not be NULL) |
|
extern |
Complex cosine function.
| c | The operand (must not be NULL) |
|
extern |
Complex hyperbolic cosine function.
| c | The operand (must not be NULL) |
|
extern |
Divide two floating-point complex numbers.
| a | Dividend (must not be NULL) |
| b | Divisor (must not be NULL and not zero) |
|
extern |
Test if two floating-point complex numbers are equal.
| a | First operand (must not be NULL) |
| b | Second operand (must not be NULL) |
|
extern |
Complex exponential function.
| c | The operand (must not be NULL) |
|
extern |
Create a floating-point complex number from real and imaginary parts.
| real | The real part |
| imag | The imaginary part |
|
extern |
Create a floating-point complex number from polar coordinates.
| magnitude | The magnitude (radius) |
| angle | The angle in radians |
|
extern |
Get the floating-point complex i (0.0 + 1.0i)
|
extern |
Get the imaginary part of a floating-point complex number.
| c | The complex number (must not be NULL) |
|
extern |
Test if a floating-point complex number is purely imaginary (real part is zero)
| c | The complex number (must not be NULL) |
|
extern |
Test if a floating-point complex number contains infinity.
| c | The complex number (must not be NULL) |
|
extern |
Test if a floating-point complex number contains NaN.
| c | The complex number (must not be NULL) |
|
extern |
Test if a floating-point complex number is real (imaginary part is zero)
| c | The complex number (must not be NULL) |
|
extern |
Test if a floating-point complex number is zero.
| c | The complex number (must not be NULL) |
|
extern |
Complex natural logarithm.
| c | The operand (must not be NULL and not zero) |
|
extern |
Multiply two floating-point complex numbers.
| a | First operand (must not be NULL) |
| b | Second operand (must not be NULL) |
|
extern |
Get the floating-point complex -i (0.0 + -1.0i)
|
extern |
Get the floating-point complex -1 (-1.0 + 0.0i)
|
extern |
Negate a floating-point complex number.
| c | The operand (must not be NULL) |
|
extern |
Get the floating-point complex one (1.0 + 0.0i)
|
extern |
Complex power function.
| a | Base (must not be NULL) |
| b | Exponent (must not be NULL) |
|
extern |
Get the real part of a floating-point complex number.
| c | The complex number (must not be NULL) |
|
extern |
Decrement reference count and possibly free memory.
| c | Pointer to complex number pointer (gracefully handles NULL) |
|
extern |
Increment reference count and return the same object.
| c | The complex number to retain (must not be NULL) |
|
extern |
Complex sine function.
| c | The operand (must not be NULL) |
|
extern |
Complex hyperbolic sine function.
| c | The operand (must not be NULL) |
|
extern |
Complex square root.
| c | The operand (must not be NULL) |
|
extern |
Subtract two floating-point complex numbers.
| a | First operand (must not be NULL) |
| b | Second operand (must not be NULL) |
|
extern |
Complex tangent function.
| c | The operand (must not be NULL) |
|
extern |
Complex hyperbolic tangent function.
| c | The operand (must not be NULL) |
|
extern |
Convert floating-point complex number to mathematical string representation.
| c | The complex number (must not be NULL) |
|
extern |
Get the floating-point complex zero (0.0 + 0.0i)