GOComplex

GOComplex

Functions

GType go_complex_get_type ()
GType go_complexl_get_type ()
GType go_complexD_get_type ()
void go_complex_add ()
void go_complex_addl ()
void go_complex_addD ()
double go_complex_angle ()
long double go_complex_anglel ()
_Decimal64 go_complex_angleD ()
double go_complex_angle_pi ()
long double go_complex_angle_pil ()
_Decimal64 go_complex_angle_piD ()
void go_complex_conj ()
void go_complex_conjl ()
void go_complex_conjD ()
void go_complex_cos ()
void go_complex_cosl ()
void go_complex_cosD ()
void go_complex_div ()
void go_complex_divl ()
void go_complex_divD ()
void go_complex_exp ()
void go_complex_expl ()
void go_complex_expD ()
void go_complex_from_polar ()
void go_complex_from_polarl ()
void go_complex_from_polarD ()
void go_complex_from_polar_pi ()
void go_complex_from_polar_pil ()
void go_complex_from_polar_piD ()
int go_complex_from_string ()
int go_complex_from_stringl ()
int go_complex_from_stringD ()
void go_complex_init ()
void go_complex_initl ()
void go_complex_initD ()
void go_complex_invalid ()
void go_complex_invalidl ()
void go_complex_invalidD ()
gboolean go_complex_invalid_p ()
gboolean go_complex_invalid_pl ()
gboolean go_complex_invalid_pD ()
void go_complex_ln ()
void go_complex_lnl ()
void go_complex_lnD ()
double go_complex_mod ()
long double go_complex_modl ()
_Decimal64 go_complex_modD ()
void go_complex_mul ()
void go_complex_mull ()
void go_complex_mulD ()
void go_complex_pow ()
void go_complex_powl ()
void go_complex_powD ()
void go_complex_powx ()
void go_complex_powxl ()
void go_complex_powxD ()
void go_complex_real ()
void go_complex_reall ()
void go_complex_realD ()
gboolean go_complex_real_p ()
gboolean go_complex_real_pl ()
gboolean go_complex_real_pD ()
void go_complex_scale_real ()
void go_complex_scale_reall ()
void go_complex_scale_realD ()
void go_complex_sin ()
void go_complex_sinl ()
void go_complex_sinD ()
void go_complex_sqrt ()
void go_complex_sqrtl ()
void go_complex_sqrtD ()
void go_complex_sub ()
void go_complex_subl ()
void go_complex_subD ()
void go_complex_tan ()
void go_complex_tanl ()
void go_complex_tanD ()
void go_complex_to_polar ()
void go_complex_to_polarl ()
void go_complex_to_polarD ()
char * go_complex_to_string ()
char * go_complex_to_stringl ()
char * go_complex_to_stringD ()
gboolean go_complex_zero_p ()
gboolean go_complex_zero_pl ()
gboolean go_complex_zero_pD ()

Object Hierarchy

    GBoxed
    ├── GOComplex
    ╰── GOComplexl

Description

Functions

go_complex_get_type ()

GType
go_complex_get_type (void);

go_complexl_get_type ()

GType
go_complexl_get_type (void);

go_complexD_get_type ()

GType
go_complexD_get_type (void);

go_complex_add ()

void
go_complex_add (GOComplex *dst,
                GOComplex const *a,
                GOComplex const *b);

Computes a plus b .

Parameters

dst

destination.

[out]

a

first argument

 

b

first argument

 

go_complex_addl ()

void
go_complex_addl (GOComplexl *dst,
                 GOComplexl const *a,
                 GOComplexl const *b);

Computes a plus b .

Parameters

dst

destination.

[out]

a

first argument

 

b

first argument

 

go_complex_addD ()

void
go_complex_addD (GOComplexD *dst,
                 GOComplexD const *a,
                 GOComplexD const *b);

Computes a plus b .

Parameters

dst

destination.

[out]

a

first argument

 

b

first argument

 

go_complex_angle ()

double
go_complex_angle (GOComplex const *src);

Parameters

src

argument

 

Returns

the complex argument


go_complex_anglel ()

long double
go_complex_anglel (GOComplexl const *src);

Parameters

src

argument

 

Returns

the complex argument


go_complex_angleD ()

_Decimal64
go_complex_angleD (GOComplexD const *src);

Parameters

src

argument

 

Returns

the complex argument


go_complex_angle_pi ()

double
go_complex_angle_pi (GOComplex const *src);

Parameters

src

argument

 

Returns

the complex argument divided by pi


go_complex_angle_pil ()

long double
go_complex_angle_pil (GOComplexl const *src);

Parameters

src

argument

 

Returns

the complex argument divided by pi


go_complex_angle_piD ()

_Decimal64
go_complex_angle_piD (GOComplexD const *src);

Parameters

src

argument

 

Returns

the complex argument divided by pi


go_complex_conj ()

void
go_complex_conj (GOComplex *dst,
                 GOComplex const *src);

Computes the complex conjugate.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_conjl ()

void
go_complex_conjl (GOComplexl *dst,
                  GOComplexl const *src);

Computes the complex conjugate.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_conjD ()

void
go_complex_conjD (GOComplexD *dst,
                  GOComplexD const *src);

Computes the complex conjugate.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_cos ()

void
go_complex_cos (GOComplex *dst,
                GOComplex const *src);

Computes the complex cosine function.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_cosl ()

void
go_complex_cosl (GOComplexl *dst,
                 GOComplexl const *src);

Computes the complex cosine function.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_cosD ()

void
go_complex_cosD (GOComplexD *dst,
                 GOComplexD const *src);

Computes the complex cosine function.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_div ()

void
go_complex_div (GOComplex *dst,
                GOComplex const *a,
                GOComplex const *b);

Computes a divided by b .

Parameters

dst

destination.

[out]

a

first argument

 

b

first argument

 

go_complex_divl ()

void
go_complex_divl (GOComplexl *dst,
                 GOComplexl const *a,
                 GOComplexl const *b);

Computes a divided by b .

Parameters

dst

destination.

[out]

a

first argument

 

b

first argument

 

go_complex_divD ()

void
go_complex_divD (GOComplexD *dst,
                 GOComplexD const *a,
                 GOComplexD const *b);

Computes a divided by b .

Parameters

dst

destination.

[out]

a

first argument

 

b

first argument

 

go_complex_exp ()

void
go_complex_exp (GOComplex *dst,
                GOComplex const *src);

Computes the complex exponential function.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_expl ()

void
go_complex_expl (GOComplexl *dst,
                 GOComplexl const *src);

Computes the complex exponentiation function.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_expD ()

void
go_complex_expD (GOComplexD *dst,
                 GOComplexD const *src);

Computes the complex exponentiation function.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_from_polar ()

void
go_complex_from_polar (GOComplex *dst,
                       double mod,
                       double angle);

Initializes a complex number from polar coordinates.

Parameters

dst

destination.

[out]

mod

modulus

 

angle

argument.

 

go_complex_from_polarl ()

void
go_complex_from_polarl (GOComplexl *dst,
                        long double mod,
                        long double angle);

Initializes a complex number from polar coordinates.

Parameters

dst

destination.

[out]

mod

modulus

 

angle

argument.

 

go_complex_from_polarD ()

void
go_complex_from_polarD (GOComplexD *dst,
                        _Decimal64 mod,
                        _Decimal64 angle);

Initializes a complex number from polar coordinates.

Parameters

dst

destination.

[out]

mod

modulus

 

angle

argument.

 

go_complex_from_polar_pi ()

void
go_complex_from_polar_pi (GOComplex *dst,
                          double mod,
                          double angle);

Initializes a complex number from polar coordinates, except that the argument is divided by pi to ensure that important values can be represented without rounding errors.

Parameters

dst

destination.

[out]

mod

modulus

 

angle

argument divided by pi

 

go_complex_from_polar_pil ()

void
go_complex_from_polar_pil (GOComplexl *dst,
                           long double mod,
                           long double angle);

Initializes a complex number from polar coordinates, except that the argument is divided by pi to ensure that important values can be represented without rounding errors.

Parameters

dst

destination.

[out]

mod

modulus

 

angle

argument divided by pi

 

go_complex_from_polar_piD ()

void
go_complex_from_polar_piD (GOComplexD *dst,
                           _Decimal64 mod,
                           _Decimal64 angle);

Initializes a complex number from polar coordinates, except that the argument is divided by pi to ensure that important values can be represented without rounding errors.

Parameters

dst

destination.

[out]

mod

modulus

 

angle

argument divided by pi

 

go_complex_from_string ()

int
go_complex_from_string (GOComplex *dst,
                        char const *src,
                        char *imunit);

Parameters

dst

destination.

[out]

src

text to parse as a complex number

 

imunit

character unit used for imaginary unit, typically 'i'

 

Returns

zero if successful, non-zero otherwise


go_complex_from_stringl ()

int
go_complex_from_stringl (GOComplexl *dst,
                         char const *src,
                         char *imunit);

Parameters

dst

destination.

[out]

src

text to parse as a complex number

 

imunit

character unit used for imaginary unit, typically 'i'

 

Returns

zero if successful, non-zero otherwise


go_complex_from_stringD ()

int
go_complex_from_stringD (GOComplexD *dst,
                         char const *src,
                         char *imunit);

Parameters

dst

destination.

[out]

src

text to parse as a complex number

 

imunit

character unit used for imaginary unit, typically 'i'

 

Returns

zero if successful, non-zero otherwise


go_complex_init ()

void
go_complex_init (GOComplex *dst,
                 double re,
                 double im);

Initializes a complex number from real and complex parts.

Parameters

dst

destination.

[out]

re

real value

 

im

imaginary value

 

go_complex_initl ()

void
go_complex_initl (GOComplexl *dst,
                  long double re,
                  long double im);

Initializes a complex number from real and complex parts.

Parameters

dst

destination.

[out]

re

real value

 

im

imaginary value

 

go_complex_initD ()

void
go_complex_initD (GOComplexD *dst,
                  _Decimal64 re,
                  _Decimal64 im);

Initializes a complex number from real and complex parts.

Parameters

dst

destination.

[out]

re

real value

 

im

imaginary value

 

go_complex_invalid ()

void
go_complex_invalid (GOComplex *dst);

Initializes a complex number with real and complex parts both NaN.

Parameters

dst

destination.

[out]

go_complex_invalidl ()

void
go_complex_invalidl (GOComplexl *dst);

Initializes a complex number with real and complex parts both NaN.

Parameters

dst

destination.

[out]

go_complex_invalidD ()

void
go_complex_invalidD (GOComplexD *dst);

Initializes a complex number with real and complex parts both NaN.

Parameters

dst

destination.

[out]

go_complex_invalid_p ()

gboolean
go_complex_invalid_p (GOComplex const *src);

Parameters

src

complex value

 

Returns

TRUE if the complex number is invalid, i.e., either the real or the complex component is NaN.


go_complex_invalid_pl ()

gboolean
go_complex_invalid_pl (GOComplexl const *src);

Parameters

src

complex value

 

Returns

TRUE if the complex number is invalid, i.e., either the real or the complex component is NaN.


go_complex_invalid_pD ()

gboolean
go_complex_invalid_pD (GOComplexD const *src);

Parameters

src

complex value

 

Returns

TRUE if the complex number is invalid, i.e., either the real or the complex component is NaN.


go_complex_ln ()

void
go_complex_ln (GOComplex *dst,
               GOComplex const *src);

Computes the complex logarithm function's principal branch.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_lnl ()

void
go_complex_lnl (GOComplexl *dst,
                GOComplexl const *src);

Computes the complex logarithm function's principal branch.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_lnD ()

void
go_complex_lnD (GOComplexD *dst,
                GOComplexD const *src);

Computes the complex logarithm function's principal branch.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_mod ()

double
go_complex_mod (GOComplex const *src);

Parameters

src

argument

 

Returns

the complex modulus.


go_complex_modl ()

long double
go_complex_modl (GOComplexl const *src);

Parameters

src

argument

 

Returns

the complex modulus.


go_complex_modD ()

_Decimal64
go_complex_modD (GOComplexD const *src);

Parameters

src

argument

 

Returns

the complex modulus.


go_complex_mul ()

void
go_complex_mul (GOComplex *dst,
                GOComplex const *a,
                GOComplex const *b);

Computes a multiplied by b .

Parameters

dst

destination.

[out]

a

first argument

 

b

first argument

 

go_complex_mull ()

void
go_complex_mull (GOComplexl *dst,
                 GOComplexl const *a,
                 GOComplexl const *b);

Computes a multiplied by b .

Parameters

dst

destination.

[out]

a

first argument

 

b

first argument

 

go_complex_mulD ()

void
go_complex_mulD (GOComplexD *dst,
                 GOComplexD const *a,
                 GOComplexD const *b);

Computes a multiplied by b .

Parameters

dst

destination.

[out]

a

first argument

 

b

first argument

 

go_complex_pow ()

void
go_complex_pow (GOComplex *dst,
                GOComplex const *a,
                GOComplex const *b);

Computes the complex power a to the power of b .

Parameters

dst

destination.

[out]

a

first argument

 

b

second argument

 

go_complex_powl ()

void
go_complex_powl (GOComplexl *dst,
                 GOComplexl const *a,
                 GOComplexl const *b);

Computes the complex power a to the power of b .

Parameters

dst

destination.

[out]

a

first argument

 

b

second argument

 

go_complex_powD ()

void
go_complex_powD (GOComplexD *dst,
                 GOComplexD const *a,
                 GOComplexD const *b);

Computes the complex power a to the power of b .

Parameters

dst

destination.

[out]

a

first argument

 

b

second argument

 

go_complex_powx ()

void
go_complex_powx (GOComplex *dst,
                 double *e,
                 GOComplex const *a,
                 GOComplex const *b);

go_complex_powxl ()

void
go_complex_powxl (GOComplexl *dst,
                  long double *e,
                  GOComplexl const *a,
                  GOComplexl const *b);

go_complex_powxD ()

void
go_complex_powxD (GOComplexD *dst,
                  _Decimal64 *e,
                  GOComplexD const *a,
                  GOComplexD const *b);

go_complex_real ()

void
go_complex_real (GOComplex *dst,
                 double re);

Initializes a complex number from a real value.

Parameters

dst

destination.

[out]

re

real value

 

go_complex_reall ()

void
go_complex_reall (GOComplexl *dst,
                  long double re);

Initializes a complex number from a real value.

Parameters

dst

destination.

[out]

re

real value

 

go_complex_realD ()

void
go_complex_realD (GOComplexD *dst,
                  _Decimal64 re);

Initializes a complex number from a real value.

Parameters

dst

destination.

[out]

re

real value

 

go_complex_real_p ()

gboolean
go_complex_real_p (GOComplex const *src);

Parameters

src

complex value

 

Returns

TRUE if the complex number has no complex component.


go_complex_real_pl ()

gboolean
go_complex_real_pl (GOComplexl const *src);

Parameters

src

complex value

 

Returns

TRUE if the complex number has no complex component.


go_complex_real_pD ()

gboolean
go_complex_real_pD (GOComplexD const *src);

Parameters

src

complex value

 

Returns

TRUE if the complex number has no complex component.


go_complex_scale_real ()

void
go_complex_scale_real (GOComplex *dst,
                       double f);

Scales a complex number by a real scale.

Parameters

dst

complex value.

[inout]

f

scale

 

go_complex_scale_reall ()

void
go_complex_scale_reall (GOComplexl *dst,
                        long double f);

Scales a complex number by a real scale.

Parameters

dst

complex value.

[inout]

f

scale

 

go_complex_scale_realD ()

void
go_complex_scale_realD (GOComplexD *dst,
                        _Decimal64 f);

Scales a complex number by a real scale.

Parameters

dst

complex value.

[inout]

f

scale

 

go_complex_sin ()

void
go_complex_sin (GOComplex *dst,
                GOComplex const *src);

Computes the complex sine function.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_sinl ()

void
go_complex_sinl (GOComplexl *dst,
                 GOComplexl const *src);

Computes the complex sine function.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_sinD ()

void
go_complex_sinD (GOComplexD *dst,
                 GOComplexD const *src);

Computes the complex sine function.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_sqrt ()

void
go_complex_sqrt (GOComplex *dst,
                 GOComplex const *src);

Computes the complex square root.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_sqrtl ()

void
go_complex_sqrtl (GOComplexl *dst,
                  GOComplexl const *src);

Computes the complex square root.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_sqrtD ()

void
go_complex_sqrtD (GOComplexD *dst,
                  GOComplexD const *src);

Computes the complex square root.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_sub ()

void
go_complex_sub (GOComplex *dst,
                GOComplex const *a,
                GOComplex const *b);

Computes a minus b .

Parameters

dst

destination.

[out]

a

first argument

 

b

first argument

 

go_complex_subl ()

void
go_complex_subl (GOComplexl *dst,
                 GOComplexl const *a,
                 GOComplexl const *b);

Computes a minus b .

Parameters

dst

destination.

[out]

a

first argument

 

b

first argument

 

go_complex_subD ()

void
go_complex_subD (GOComplexD *dst,
                 GOComplexD const *a,
                 GOComplexD const *b);

Computes a minus b .

Parameters

dst

destination.

[out]

a

first argument

 

b

first argument

 

go_complex_tan ()

void
go_complex_tan (GOComplex *dst,
                GOComplex const *src);

Computes the complex tangent function.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_tanl ()

void
go_complex_tanl (GOComplexl *dst,
                 GOComplexl const *src);

Computes the complex tangent function.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_tanD ()

void
go_complex_tanD (GOComplexD *dst,
                 GOComplexD const *src);

Computes the complex tangent function.

Parameters

dst

destination.

[out]

src

argument

 

go_complex_to_polar ()

void
go_complex_to_polar (double *mod,
                     double *angle,
                     GOComplex const *src);

Computes the polar coordinates of src .

Parameters

mod

modulus.

[out]

angle

argument.

[out]

src

complex value

 

go_complex_to_polarl ()

void
go_complex_to_polarl (long double *mod,
                      long double *angle,
                      GOComplexl const *src);

Computes the polar coordinates of src .

Parameters

mod

modulus.

[out]

angle

argument.

[out]

src

complex value

 

go_complex_to_polarD ()

void
go_complex_to_polarD (_Decimal64 *mod,
                      _Decimal64 *angle,
                      GOComplexD const *src);

Computes the polar coordinates of src .

Parameters

mod

modulus.

[out]

angle

argument.

[out]

src

complex value

 

go_complex_to_string ()

char *
go_complex_to_string (GOComplex const *src,
                      char const *reformat,
                      char const *imformat,
                      char imunit);

Parameters

src

complex value

 

reformat

printf format for real component

 

imformat

printf format for real component

 

imunit

character unit for imaginary unit, typically 'i'

 

Returns

formats a complex number.

[transfer full]


go_complex_to_stringl ()

char *
go_complex_to_stringl (GOComplexl const *src,
                       char const *reformat,
                       char const *imformat,
                       char imunit);

Parameters

src

complex value

 

reformat

printf format for real component

 

imformat

printf format for real component

 

imunit

character unit for imaginary unit, typically 'i'

 

Returns

formats a complex number.

[transfer full]


go_complex_to_stringD ()

char *
go_complex_to_stringD (GOComplexD const *src,
                       char const *reformat,
                       char const *imformat,
                       char imunit);

Parameters

src

complex value

 

reformat

printf format for real component

 

imformat

printf format for real component

 

imunit

character unit for imaginary unit, typically 'i'

 

Returns

formats a complex number.

[transfer full]


go_complex_zero_p ()

gboolean
go_complex_zero_p (GOComplex const *src);

Parameters

src

complex value

 

Returns

TRUE if the complex number is zero.


go_complex_zero_pl ()

gboolean
go_complex_zero_pl (GOComplexl const *src);

Parameters

src

complex value

 

Returns

TRUE if the complex number is zero.


go_complex_zero_pD ()

gboolean
go_complex_zero_pD (GOComplexD const *src);

Parameters

src

complex value

 

Returns

TRUE if the complex number is zero.