[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] complex numbers and zeta function
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: [Help-gsl] complex numbers and zeta function |
Date: |
Sat, 21 Jun 2008 10:09:10 -0500 |
On 20/06/2008, Hongzheng Wang <address@hidden> wrote:
> On Sat, Jun 21, 2008 at 1:53 AM, Jordi Gutiérrez Hermoso
> <address@hidden> wrote:
>
> > Thank you. One comment: you used C complexes, which don't work in C++.
> > Funny, did you know that C and C++ have mutually incompatible
> > implementations of complex numbers, at least with gcc?
>
>
> Could you please give us more detailed info about his issue? Do you
> mean they are using difference memory layout? Or just syntax
> difference (C's complex is a macro for built-in keyword _Complex,
> while C++'s complex is a template class). I think it would be of
> benefit to us even beyond the scope of gsl. Thank you in advance.
Syntax seems to be it. They have widely different syntax. There may
also be implementation issues. The macro, unless C's complexes are not
as standard as I think they are, is "complex", not "_Complex". The
biggest problem, and maybe there is a way to override it, is that
#include<complex.h> gets interpreted different ways depending if gcc
is compiling the code as a C or a C++ program. As a C program, it
includes the right declaration, and as a C++ program, it interprets it
as an attempt to write #include <complex> and warns about deprecated
headers.
HTH,
- Jordi G. H.
- Re: [Help-gsl] complex numbers and zeta function, (continued)
- Re: [Help-gsl] complex numbers and zeta function, Jordi Gutiérrez Hermoso, 2008/06/16
- Re: [Help-gsl] complex numbers and zeta function, Inigo Aldazabal Mensa, 2008/06/17
- Re: [Help-gsl] complex numbers and zeta function, Tommy Nordgren, 2008/06/18
- Re: [Help-gsl] complex numbers and zeta function, Ruben Henner Zilibowitz, 2008/06/19
- Re: [Help-gsl] complex numbers and zeta function, Jordi Gutiérrez Hermoso, 2008/06/19
- Re: [Help-gsl] complex numbers and zeta function, Ruben Henner Zilibowitz, 2008/06/20
- Re: [Help-gsl] complex numbers and zeta function, Jordi Gutiérrez Hermoso, 2008/06/20
- Re: [Help-gsl] complex numbers and zeta function, Ruben Henner Zilibowitz, 2008/06/20
- Re: [Help-gsl] complex numbers and zeta function, Hongzheng Wang, 2008/06/21
- Re: [Help-gsl] complex numbers and zeta function,
Jordi Gutiérrez Hermoso <=
- Re: [Help-gsl] complex numbers and zeta function, Hongzheng Wang, 2008/06/21