|
Dynamic Complex Library 1.0.0
Reference-counted arbitrary precision complex number library (MIT OR Unlicense)
|
Functions for rational complex numbers. More...
Functions | |
| dc_complex_frac | dc_frac_from_ints (int64_t real_num, int64_t real_den, int64_t imag_num, int64_t imag_den) |
| Create a rational complex number from integer components. | |
| dc_complex_frac | dc_frac_from_df (df_frac real, df_frac imag) |
| Create a rational complex number from fraction components. | |
| dc_complex_frac | dc_frac_zero (void) |
| Get the rational complex zero (0/1 + 0/1 i) | |
| dc_complex_frac | dc_frac_one (void) |
| Get the rational complex one (1/1 + 0/1 i) | |
| dc_complex_frac | dc_frac_i (void) |
| Get the rational complex i (0/1 + 1/1 i) | |
| dc_complex_frac | dc_frac_neg_one (void) |
| Get the rational complex -1 (-1/1 + 0/1 i) | |
| dc_complex_frac | dc_frac_neg_i (void) |
| Get the rational complex -i (0/1 + -1/1 i) | |
| dc_complex_frac | dc_frac_retain (dc_complex_frac c) |
| Increment reference count and return the same object. | |
| void | dc_frac_release (dc_complex_frac *c) |
| Decrement reference count and possibly free memory. | |
| dc_complex_frac | dc_frac_copy (dc_complex_frac c) |
| Create a new copy with reference count 1. | |
| dc_complex_frac | dc_frac_add (dc_complex_frac a, dc_complex_frac b) |
| Add two rational complex numbers. | |
| dc_complex_frac | dc_frac_sub (dc_complex_frac a, dc_complex_frac b) |
| Subtract two rational complex numbers. | |
| dc_complex_frac | dc_frac_mul (dc_complex_frac a, dc_complex_frac b) |
| Multiply two rational complex numbers. | |
| dc_complex_frac | dc_frac_div (dc_complex_frac a, dc_complex_frac b) |
| Divide two rational complex numbers. | |
| dc_complex_frac | dc_frac_negate (dc_complex_frac c) |
| Negate a rational complex number. | |
| dc_complex_frac | dc_frac_conj (dc_complex_frac c) |
| Complex conjugate of a rational complex number. | |
| dc_complex_frac | dc_frac_reciprocal (dc_complex_frac c) |
| Reciprocal of a rational complex number. | |
| df_frac | dc_frac_real (dc_complex_frac c) |
| Get the real part of a rational complex number. | |
| df_frac | dc_frac_imag (dc_complex_frac c) |
| Get the imaginary part of a rational complex number. | |
| bool | dc_frac_eq (dc_complex_frac a, dc_complex_frac b) |
| Test if two rational complex numbers are equal. | |
| bool | dc_frac_is_zero (dc_complex_frac c) |
| Test if a rational complex number is zero. | |
| bool | dc_frac_is_real (dc_complex_frac c) |
| Test if a rational complex number is real (imaginary part is zero) | |
| bool | dc_frac_is_imag (dc_complex_frac c) |
| Test if a rational complex number is purely imaginary (real part is zero) | |
| bool | dc_frac_is_gaussian_int (dc_complex_frac c) |
| Test if a rational complex number is actually a Gaussian integer. | |
| char * | dc_frac_to_string (dc_complex_frac c) |
| Convert rational complex number to mathematical string representation. | |
Functions for rational complex numbers.
|
extern |
Add two rational complex numbers.
| a | First operand (must not be NULL) |
| b | Second operand (must not be NULL) |
|
extern |
Complex conjugate of a rational 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 |
Divide two rational complex numbers.
| a | Dividend (must not be NULL) |
| b | Divisor (must not be NULL and not zero) |
|
extern |
Test if two rational complex numbers are equal.
| a | First operand (must not be NULL) |
| b | Second operand (must not be NULL) |
|
extern |
Create a rational complex number from fraction components.
| real | The real part (must not be NULL) |
| imag | The imaginary part (must not be NULL) |
|
extern |
Create a rational complex number from integer components.
| real_num | Numerator of real part |
| real_den | Denominator of real part (must not be zero) |
| imag_num | Numerator of imaginary part |
| imag_den | Denominator of imaginary part (must not be zero) |
|
extern |
Get the rational complex i (0/1 + 1/1 i)
|
extern |
Get the imaginary part of a rational complex number.
| c | The complex number (must not be NULL) |
|
extern |
Test if a rational complex number is actually a Gaussian integer.
| c | The complex number (must not be NULL) |
|
extern |
Test if a rational complex number is purely imaginary (real part is zero)
| c | The complex number (must not be NULL) |
|
extern |
Test if a rational complex number is real (imaginary part is zero)
| c | The complex number (must not be NULL) |
|
extern |
Test if a rational complex number is zero.
| c | The complex number (must not be NULL) |
|
extern |
Multiply two rational complex numbers.
| a | First operand (must not be NULL) |
| b | Second operand (must not be NULL) |
|
extern |
Get the rational complex -i (0/1 + -1/1 i)
|
extern |
Get the rational complex -1 (-1/1 + 0/1 i)
|
extern |
Negate a rational complex number.
| c | The operand (must not be NULL) |
|
extern |
Get the rational complex one (1/1 + 0/1 i)
|
extern |
Get the real part of a rational complex number.
| c | The complex number (must not be NULL) |
|
extern |
Reciprocal of a rational complex number.
| c | The operand (must not be NULL and not zero) |
|
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 |
Subtract two rational complex numbers.
| a | First operand (must not be NULL) |
| b | Second operand (must not be NULL) |
|
extern |
Convert rational complex number to mathematical string representation.
| c | The complex number (must not be NULL) |
|
extern |
Get the rational complex zero (0/1 + 0/1 i)