help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] some questions


From: Brian Gough
Subject: Re: [Help-gsl] some questions
Date: Mon, 10 Apr 2006 13:41:45 +0100

Raphael Mack writes:
 > Hello,
 > 
 > I'm relatively new to gsl and here. I'm writing a wrapper for the
 > programming language (Smart)Eiffel and have a few questions:
 > 
 > in gsl_complex.h the structs gsl_complex, gsl_complex_float and
 > gsl_complex_long_double are provided. But the functionss in
 > gsl_complex_math.h just support the default double size. 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?

Hello,

I can confirm there are no float versions of the complex math
functions.

The complex types in the header files are historical.  There are
sometimes things in the headers which are not used.  The supported
functions are the ones in the manual.

You can use the standard (double) versions and then convert the result
back to floats if you need to.  Generally float is only needed for
storage.

 > In gsl_complex_math.h I read:
 > 
 > double gsl_complex_arg (gsl_complex z); /* return arg(z), -pi< arg(z) <=
 > +pi */
 > 
 > How precise is this comment? May I relay on this "assertion" or may
 > 
 > assert(gsl_complex_arg(z) > - M_PI)
 > or
 > assert(gsl_complex_arg(z) <= M_PI)
 > 
 > crash for some z?

It uses the system atan2 function, so you can't really rely on it
without checking for the platform you're using.

-- 
Brian Gough

Network Theory Ltd,
Publishing the GSL Manual - http://www.network-theory.co.uk/gsl/manual/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]