[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [Help-gsl] some questions

**From**: |
Raphael Mack |

**Subject**: |
Re: [Help-gsl] some questions |

**Date**: |
Fri, 07 Apr 2006 21:44:09 +0200 |

Am Donnerstag, den 06.04.2006, 23:52 +0200 schrieb Jochen Küpper:
>* Raphael Mack <address@hidden> writes:*
>* > Am I just to blind to see some C macro or is there at the moment no*
>* > way to e. g. add to gsl_complex_float values?*
>* *
>* See*
>* ,----[ (info "(gsl-ref)Complex arithmetic operators") ]*
>* | -- Function: gsl_complex gsl_complex_add (gsl_complex A, gsl_complex B)*
>* | This function returns the sum of the complex numbers A and B,*
>* | z=a+b.*
>* `----*
I don't see your point. I've read this as:
This function returns the sum of the complex numbers A and B, being of
type gsl_complex.
Because as I (recursively) look into gsl_matrix, I see
gsl_matrix_add(gsl_matrix *a, const gsl_matrix *b) AND
gsl_matrix_float_add(gsl_matrix_float * a, const gsl_matrix_float *b).
For the complex functions this is not the case, and I wonder how/whether
it is possible to do
gsl_complex_float z, a, b;
GSL_SET_COMPLEX(&z, 1.3, 3.5); // this MACRO works for floats, too
a = gsl_complex_add_FLOAT(z, z); // see the float here
>* and probably also*
>* ,----[ (info "(gsl-ref)Data types") ]*
>* | All the functions are available for each of the standard data-types.*
>* | The versions for `double' have the prefix `gsl_block', `gsl_vector' and*
>* | `gsl_matrix'. Similarly the versions for single-precision `float'*
>* | arrays have the prefix `gsl_block_float', `gsl_vector_float' and*
>* | `gsl_matrix_float'. The full list of available types is given below,*
>* [...]*
>* | Corresponding types exist for the `gsl_vector' and `gsl_matrix'*
>* | functions.*
>* `----*
Yes, that's what I expected, but for complex I didn't find the code /
the headers for that...
Rapha