public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* gsl_complex_rect undefined?
  2001-12-19 13:20 gsl_complex_rect undefined? Abraham David Smith
@ 2001-12-10  6:38 ` Abraham David Smith
  2001-12-18  9:30 ` Abraham David Smith
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Abraham David Smith @ 2001-12-10  6:38 UTC (permalink / raw)
  To: gsl-discuss


I am trying to use GSL 1.0 on an ix86 running an essentially normal RedHat
Linux 7.1 installation (with all of RedHat's published patches applied
to gcc, etc). 

Consider the following code snippet:

#include <iostream.h>
#include <gsl/gsl_complex.h>
void main()
  {
  gsl_complex a = gsl_complex_rect(1.0,2.0);
  cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
  GSL_SET_COMPLEX (&a, 3.0, 4.0);
  cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
  }

Compiling this with g++ gives:

testcomplex.cpp: In function `int main (...)':
testcomplex.cpp:9: `gsl_complex_rect' undeclared (first use this 
function)
testcomplex.cpp:9: (Each undeclared identifier is reported only once 
for each function it appears in.)


now consider the snippet:

#include <iostream.h>
#include <gsl/gsl_complex.h>
void main()
  {
  gsl_complex a;
  cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
  GSL_SET_COMPLEX (&a, 3.0, 4.0);
  cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
  }


this compiles and gives:
2.10391, 7.02217
3, 4



According to page 18 of the GSL manual
[ http://sources.redhat.com/gsl/ref/gsl-ref_5.html#SEC34 ], the function 
gsl_complex_rect should be defined.  What's up here?


-- 
# Abraham David Smith       UW--Madison Mathematics/Physics Undergraduate [*] #
# <abrahamsmith@students.wisc.edu>  Y!:abrahamdavidsmith  AOL-IM:abrahamsmith #
# http://euclid.dsl.wisc.edu/~abe     Molon Labe!       Defend your rights!   #
# [*]: The views I express are not necessarily those of the UW--Madison, etc. #

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: gsl_complex_rect undefined?
  2001-12-19 13:20 ` Fleur Kelpin
@ 2001-12-10 12:37   ` Fleur Kelpin
  2001-12-18  9:37   ` Fleur Kelpin
  1 sibling, 0 replies; 10+ messages in thread
From: Fleur Kelpin @ 2001-12-10 12:37 UTC (permalink / raw)
  To: Abraham David Smith; +Cc: gsl-discuss

Hi,

You need the include file gsl_complex_math.h
In case of similar trouble, grep the include files:
(in the /usr/local/include or similar:)
>cd gsl/complex
>grep gsl_complex_rect *.h
gsl_complex_math.h:gsl_complex gsl_complex_rect (double x, double y);  /*
r= real+i*imag */
gsl_complex_math.h:gsl_complex_rect (double x, double y)
gsl_complex_math.h:#define GSL_COMPLEX_ONE (gsl_complex_rect(1.0,0.0))
gsl_complex_math.h:#define GSL_COMPLEX_ZERO (gsl_complex_rect(0.0,0.0))
gsl_complex_math.h:#define GSL_COMPLEX_NEGONE (gsl_complex_rect(-1.0,0.0))

Greetings,
Fleur Kelpin

On Tue, 18 Dec 2001, Abraham David Smith wrote:

>
> I am trying to use GSL 1.0 on an ix86 running an essentially normal RedHat
> Linux 7.1 installation (with all of RedHat's published patches applied
> to gcc, etc).
>
> Consider the following code snippet:
>
> #include <iostream.h>
> #include <gsl/gsl_complex.h>
> void main()
>   {
>   gsl_complex a = gsl_complex_rect(1.0,2.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   GSL_SET_COMPLEX (&a, 3.0, 4.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   }
>
> Compiling this with g++ gives:
>
> testcomplex.cpp: In function `int main (...)':
> testcomplex.cpp:9: `gsl_complex_rect' undeclared (first use this
> function)
> testcomplex.cpp:9: (Each undeclared identifier is reported only once
> for each function it appears in.)
>
>
> now consider the snippet:
>
> #include <iostream.h>
> #include <gsl/gsl_complex.h>
> void main()
>   {
>   gsl_complex a;
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   GSL_SET_COMPLEX (&a, 3.0, 4.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   }
>
>
> this compiles and gives:
> 2.10391, 7.02217
> 3, 4
>
>
>
> According to page 18 of the GSL manual
> [ http://sources.redhat.com/gsl/ref/gsl-ref_5.html#SEC34 ], the function
> gsl_complex_rect should be defined.  What's up here?
>
>
> --
> # Abraham David Smith       UW--Madison Mathematics/Physics Undergraduate [*] #
> # <abrahamsmith@students.wisc.edu>  Y!:abrahamdavidsmith  AOL-IM:abrahamsmith #
> # http://euclid.dsl.wisc.edu/~abe     Molon Labe!       Defend your rights!   #
> # [*]: The views I express are not necessarily those of the UW--Madison, etc. #
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: gsl_complex_rect undefined?
  2001-12-19 13:20 ` Tisserand Patrice
@ 2001-12-10 13:11   ` Tisserand Patrice
  2001-12-18  9:39   ` Tisserand Patrice
  1 sibling, 0 replies; 10+ messages in thread
From: Tisserand Patrice @ 2001-12-10 13:11 UTC (permalink / raw)
  To: abrahamsmith; +Cc: gsl-discuss

Abraham David Smith wrote:

> I am trying to use GSL 1.0 on an ix86 running an essentially normal RedHat
> Linux 7.1 installation (with all of RedHat's published patches applied
> to gcc, etc).
>
> Consider the following code snippet:
>
> #include <iostream.h>

/*
    Humm: It's out of topic but it's better to use:
    #include <iostream> instead of #include <iostream.h> old version of include
file
    and add:
    using namespace std;
*/

>
> #include <gsl/gsl_complex.h>

#include <gsl/gsl_complex_math.h> /* See comments lower */

>
> void main()
>   {
>   gsl_complex a = gsl_complex_rect(1.0,2.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   GSL_SET_COMPLEX (&a, 3.0, 4.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   }
>
> Compiling this with g++ gives:
>
> testcomplex.cpp: In function `int main (...)':
> testcomplex.cpp:9: `gsl_complex_rect' undeclared (first use this
> function)
> testcomplex.cpp:9: (Each undeclared identifier is reported only once
> for each function it appears in.)
>
> now consider the snippet:
>
> #include <iostream.h>
> #include <gsl/gsl_complex.h>
> void main()
>   {
>   gsl_complex a;
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   GSL_SET_COMPLEX (&a, 3.0, 4.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   }
>
> this compiles and gives:
> 2.10391, 7.02217
> 3, 4
>
> According to page 18 of the GSL manual
> [ http://sources.redhat.com/gsl/ref/gsl-ref_5.html#SEC34 ], the function
> gsl_complex_rect should be defined.  What's up here?
>

According to the same page of the GSL Manual:
The complex types are defined in the header file `gsl_complex.h', while the
corresponding complex functions and arithmetic operations are defined in
`gsl_complex_math.h'.
I made the same mistake some time ago and I take some time to understand why it
doesn't work.

Thanks to be open source

Patrice


>
> --
> # Abraham David Smith       UW--Madison Mathematics/Physics Undergraduate [*] #
> # <abrahamsmith@students.wisc.edu>  Y!:abrahamdavidsmith  AOL-IM:abrahamsmith #
> # http://euclid.dsl.wisc.edu/~abe     Molon Labe!       Defend your rights!   #
> # [*]: The views I express are not necessarily those of the UW--Madison, etc. #

^ permalink raw reply	[flat|nested] 10+ messages in thread

* gsl_complex_rect undefined?
  2001-12-19 13:20 gsl_complex_rect undefined? Abraham David Smith
  2001-12-10  6:38 ` Abraham David Smith
@ 2001-12-18  9:30 ` Abraham David Smith
  2001-12-19 13:20 ` Tisserand Patrice
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Abraham David Smith @ 2001-12-18  9:30 UTC (permalink / raw)
  To: gsl-discuss

I am trying to use GSL 1.0 on an ix86 running an essentially normal RedHat
Linux 7.1 installation (with all of RedHat's published patches applied
to gcc, etc). 

Consider the following code snippet:

#include <iostream.h>
#include <gsl/gsl_complex.h>
void main()
  {
  gsl_complex a = gsl_complex_rect(1.0,2.0);
  cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
  GSL_SET_COMPLEX (&a, 3.0, 4.0);
  cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
  }

Compiling this with g++ gives:

testcomplex.cpp: In function `int main (...)':
testcomplex.cpp:9: `gsl_complex_rect' undeclared (first use this 
function)
testcomplex.cpp:9: (Each undeclared identifier is reported only once 
for each function it appears in.)


now consider the snippet:

#include <iostream.h>
#include <gsl/gsl_complex.h>
void main()
  {
  gsl_complex a;
  cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
  GSL_SET_COMPLEX (&a, 3.0, 4.0);
  cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
  }


this compiles and gives:
2.10391, 7.02217
3, 4



According to page 18 of the GSL manual
[ http://sources.redhat.com/gsl/ref/gsl-ref_5.html#SEC34 ], the function 
gsl_complex_rect should be defined.  What's up here?


-- 
# Abraham David Smith       UW--Madison Mathematics/Physics Undergraduate [*] #
# <abrahamsmith@students.wisc.edu>  Y!:abrahamdavidsmith  AOL-IM:abrahamsmith #
# http://euclid.dsl.wisc.edu/~abe     Molon Labe!       Defend your rights!   #
# [*]: The views I express are not necessarily those of the UW--Madison, etc. #

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: gsl_complex_rect undefined?
  2001-12-19 13:20 ` Fleur Kelpin
  2001-12-10 12:37   ` Fleur Kelpin
@ 2001-12-18  9:37   ` Fleur Kelpin
  1 sibling, 0 replies; 10+ messages in thread
From: Fleur Kelpin @ 2001-12-18  9:37 UTC (permalink / raw)
  To: Abraham David Smith; +Cc: gsl-discuss

Hi,

You need the include file gsl_complex_math.h
In case of similar trouble, grep the include files:
(in the /usr/local/include or similar:)
>cd gsl/complex
>grep gsl_complex_rect *.h
gsl_complex_math.h:gsl_complex gsl_complex_rect (double x, double y);  /*
r= real+i*imag */
gsl_complex_math.h:gsl_complex_rect (double x, double y)
gsl_complex_math.h:#define GSL_COMPLEX_ONE (gsl_complex_rect(1.0,0.0))
gsl_complex_math.h:#define GSL_COMPLEX_ZERO (gsl_complex_rect(0.0,0.0))
gsl_complex_math.h:#define GSL_COMPLEX_NEGONE (gsl_complex_rect(-1.0,0.0))

Greetings,
Fleur Kelpin

On Tue, 18 Dec 2001, Abraham David Smith wrote:

>
> I am trying to use GSL 1.0 on an ix86 running an essentially normal RedHat
> Linux 7.1 installation (with all of RedHat's published patches applied
> to gcc, etc).
>
> Consider the following code snippet:
>
> #include <iostream.h>
> #include <gsl/gsl_complex.h>
> void main()
>   {
>   gsl_complex a = gsl_complex_rect(1.0,2.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   GSL_SET_COMPLEX (&a, 3.0, 4.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   }
>
> Compiling this with g++ gives:
>
> testcomplex.cpp: In function `int main (...)':
> testcomplex.cpp:9: `gsl_complex_rect' undeclared (first use this
> function)
> testcomplex.cpp:9: (Each undeclared identifier is reported only once
> for each function it appears in.)
>
>
> now consider the snippet:
>
> #include <iostream.h>
> #include <gsl/gsl_complex.h>
> void main()
>   {
>   gsl_complex a;
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   GSL_SET_COMPLEX (&a, 3.0, 4.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   }
>
>
> this compiles and gives:
> 2.10391, 7.02217
> 3, 4
>
>
>
> According to page 18 of the GSL manual
> [ http://sources.redhat.com/gsl/ref/gsl-ref_5.html#SEC34 ], the function
> gsl_complex_rect should be defined.  What's up here?
>
>
> --
> # Abraham David Smith       UW--Madison Mathematics/Physics Undergraduate [*] #
> # <abrahamsmith@students.wisc.edu>  Y!:abrahamdavidsmith  AOL-IM:abrahamsmith #
> # http://euclid.dsl.wisc.edu/~abe     Molon Labe!       Defend your rights!   #
> # [*]: The views I express are not necessarily those of the UW--Madison, etc. #
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: gsl_complex_rect undefined?
  2001-12-19 13:20 ` Tisserand Patrice
  2001-12-10 13:11   ` Tisserand Patrice
@ 2001-12-18  9:39   ` Tisserand Patrice
  1 sibling, 0 replies; 10+ messages in thread
From: Tisserand Patrice @ 2001-12-18  9:39 UTC (permalink / raw)
  To: abrahamsmith; +Cc: gsl-discuss

Abraham David Smith wrote:

> I am trying to use GSL 1.0 on an ix86 running an essentially normal RedHat
> Linux 7.1 installation (with all of RedHat's published patches applied
> to gcc, etc).
>
> Consider the following code snippet:
>
> #include <iostream.h>

/*
    Humm: It's out of topic but it's better to use:
    #include <iostream> instead of #include <iostream.h> old version of include
file
    and add:
    using namespace std;
*/

>
> #include <gsl/gsl_complex.h>

#include <gsl/gsl_complex_math.h> /* See comments lower */

>
> void main()
>   {
>   gsl_complex a = gsl_complex_rect(1.0,2.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   GSL_SET_COMPLEX (&a, 3.0, 4.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   }
>
> Compiling this with g++ gives:
>
> testcomplex.cpp: In function `int main (...)':
> testcomplex.cpp:9: `gsl_complex_rect' undeclared (first use this
> function)
> testcomplex.cpp:9: (Each undeclared identifier is reported only once
> for each function it appears in.)
>
> now consider the snippet:
>
> #include <iostream.h>
> #include <gsl/gsl_complex.h>
> void main()
>   {
>   gsl_complex a;
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   GSL_SET_COMPLEX (&a, 3.0, 4.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   }
>
> this compiles and gives:
> 2.10391, 7.02217
> 3, 4
>
> According to page 18 of the GSL manual
> [ http://sources.redhat.com/gsl/ref/gsl-ref_5.html#SEC34 ], the function
> gsl_complex_rect should be defined.  What's up here?
>

According to the same page of the GSL Manual:
The complex types are defined in the header file `gsl_complex.h', while the
corresponding complex functions and arithmetic operations are defined in
`gsl_complex_math.h'.
I made the same mistake some time ago and I take some time to understand why it
doesn't work.

Thanks to be open source

Patrice


>
> --
> # Abraham David Smith       UW--Madison Mathematics/Physics Undergraduate [*] #
> # <abrahamsmith@students.wisc.edu>  Y!:abrahamdavidsmith  AOL-IM:abrahamsmith #
> # http://euclid.dsl.wisc.edu/~abe     Molon Labe!       Defend your rights!   #
> # [*]: The views I express are not necessarily those of the UW--Madison, etc. #

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: gsl_complex_rect undefined?
  2001-12-19 13:20 gsl_complex_rect undefined? Abraham David Smith
  2001-12-10  6:38 ` Abraham David Smith
  2001-12-18  9:30 ` Abraham David Smith
@ 2001-12-19 13:20 ` Tisserand Patrice
  2001-12-10 13:11   ` Tisserand Patrice
  2001-12-18  9:39   ` Tisserand Patrice
  2001-12-19 13:20 ` Abraham David Smith
  2001-12-19 13:20 ` Fleur Kelpin
  4 siblings, 2 replies; 10+ messages in thread
From: Tisserand Patrice @ 2001-12-19 13:20 UTC (permalink / raw)
  To: abrahamsmith; +Cc: gsl-discuss

Abraham David Smith wrote:

> I am trying to use GSL 1.0 on an ix86 running an essentially normal RedHat
> Linux 7.1 installation (with all of RedHat's published patches applied
> to gcc, etc).
>
> Consider the following code snippet:
>
> #include <iostream.h>

/*
    Humm: It's out of topic but it's better to use:
    #include <iostream> instead of #include <iostream.h> old version of include
file
    and add:
    using namespace std;
*/

>
> #include <gsl/gsl_complex.h>

#include <gsl/gsl_complex_math.h> /* See comments lower */

>
> void main()
>   {
>   gsl_complex a = gsl_complex_rect(1.0,2.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   GSL_SET_COMPLEX (&a, 3.0, 4.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   }
>
> Compiling this with g++ gives:
>
> testcomplex.cpp: In function `int main (...)':
> testcomplex.cpp:9: `gsl_complex_rect' undeclared (first use this
> function)
> testcomplex.cpp:9: (Each undeclared identifier is reported only once
> for each function it appears in.)
>
> now consider the snippet:
>
> #include <iostream.h>
> #include <gsl/gsl_complex.h>
> void main()
>   {
>   gsl_complex a;
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   GSL_SET_COMPLEX (&a, 3.0, 4.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   }
>
> this compiles and gives:
> 2.10391, 7.02217
> 3, 4
>
> According to page 18 of the GSL manual
> [ http://sources.redhat.com/gsl/ref/gsl-ref_5.html#SEC34 ], the function
> gsl_complex_rect should be defined.  What's up here?
>

According to the same page of the GSL Manual:
The complex types are defined in the header file `gsl_complex.h', while the
corresponding complex functions and arithmetic operations are defined in
`gsl_complex_math.h'.
I made the same mistake some time ago and I take some time to understand why it
doesn't work.

Thanks to be open source

Patrice


>
> --
> # Abraham David Smith       UW--Madison Mathematics/Physics Undergraduate [*] #
> # <abrahamsmith@students.wisc.edu>  Y!:abrahamdavidsmith  AOL-IM:abrahamsmith #
> # http://euclid.dsl.wisc.edu/~abe     Molon Labe!       Defend your rights!   #
> # [*]: The views I express are not necessarily those of the UW--Madison, etc. #

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: gsl_complex_rect undefined?
  2001-12-19 13:20 gsl_complex_rect undefined? Abraham David Smith
                   ` (3 preceding siblings ...)
  2001-12-19 13:20 ` Abraham David Smith
@ 2001-12-19 13:20 ` Fleur Kelpin
  2001-12-10 12:37   ` Fleur Kelpin
  2001-12-18  9:37   ` Fleur Kelpin
  4 siblings, 2 replies; 10+ messages in thread
From: Fleur Kelpin @ 2001-12-19 13:20 UTC (permalink / raw)
  To: Abraham David Smith; +Cc: gsl-discuss

Hi,

You need the include file gsl_complex_math.h
In case of similar trouble, grep the include files:
(in the /usr/local/include or similar:)
>cd gsl/complex
>grep gsl_complex_rect *.h
gsl_complex_math.h:gsl_complex gsl_complex_rect (double x, double y);  /*
r= real+i*imag */
gsl_complex_math.h:gsl_complex_rect (double x, double y)
gsl_complex_math.h:#define GSL_COMPLEX_ONE (gsl_complex_rect(1.0,0.0))
gsl_complex_math.h:#define GSL_COMPLEX_ZERO (gsl_complex_rect(0.0,0.0))
gsl_complex_math.h:#define GSL_COMPLEX_NEGONE (gsl_complex_rect(-1.0,0.0))

Greetings,
Fleur Kelpin

On Tue, 18 Dec 2001, Abraham David Smith wrote:

>
> I am trying to use GSL 1.0 on an ix86 running an essentially normal RedHat
> Linux 7.1 installation (with all of RedHat's published patches applied
> to gcc, etc).
>
> Consider the following code snippet:
>
> #include <iostream.h>
> #include <gsl/gsl_complex.h>
> void main()
>   {
>   gsl_complex a = gsl_complex_rect(1.0,2.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   GSL_SET_COMPLEX (&a, 3.0, 4.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   }
>
> Compiling this with g++ gives:
>
> testcomplex.cpp: In function `int main (...)':
> testcomplex.cpp:9: `gsl_complex_rect' undeclared (first use this
> function)
> testcomplex.cpp:9: (Each undeclared identifier is reported only once
> for each function it appears in.)
>
>
> now consider the snippet:
>
> #include <iostream.h>
> #include <gsl/gsl_complex.h>
> void main()
>   {
>   gsl_complex a;
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   GSL_SET_COMPLEX (&a, 3.0, 4.0);
>   cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
>   }
>
>
> this compiles and gives:
> 2.10391, 7.02217
> 3, 4
>
>
>
> According to page 18 of the GSL manual
> [ http://sources.redhat.com/gsl/ref/gsl-ref_5.html#SEC34 ], the function
> gsl_complex_rect should be defined.  What's up here?
>
>
> --
> # Abraham David Smith       UW--Madison Mathematics/Physics Undergraduate [*] #
> # <abrahamsmith@students.wisc.edu>  Y!:abrahamdavidsmith  AOL-IM:abrahamsmith #
> # http://euclid.dsl.wisc.edu/~abe     Molon Labe!       Defend your rights!   #
> # [*]: The views I express are not necessarily those of the UW--Madison, etc. #
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* gsl_complex_rect undefined?
@ 2001-12-19 13:20 Abraham David Smith
  2001-12-10  6:38 ` Abraham David Smith
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Abraham David Smith @ 2001-12-19 13:20 UTC (permalink / raw)
  To: gsl-discuss


I am trying to use GSL 1.0 on an ix86 running an essentially normal RedHat
Linux 7.1 installation (with all of RedHat's published patches applied
to gcc, etc). 

Consider the following code snippet:

#include <iostream.h>
#include <gsl/gsl_complex.h>
void main()
  {
  gsl_complex a = gsl_complex_rect(1.0,2.0);
  cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
  GSL_SET_COMPLEX (&a, 3.0, 4.0);
  cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
  }

Compiling this with g++ gives:

testcomplex.cpp: In function `int main (...)':
testcomplex.cpp:9: `gsl_complex_rect' undeclared (first use this 
function)
testcomplex.cpp:9: (Each undeclared identifier is reported only once 
for each function it appears in.)


now consider the snippet:

#include <iostream.h>
#include <gsl/gsl_complex.h>
void main()
  {
  gsl_complex a;
  cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
  GSL_SET_COMPLEX (&a, 3.0, 4.0);
  cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
  }


this compiles and gives:
2.10391, 7.02217
3, 4



According to page 18 of the GSL manual
[ http://sources.redhat.com/gsl/ref/gsl-ref_5.html#SEC34 ], the function 
gsl_complex_rect should be defined.  What's up here?


-- 
# Abraham David Smith       UW--Madison Mathematics/Physics Undergraduate [*] #
# <abrahamsmith@students.wisc.edu>  Y!:abrahamdavidsmith  AOL-IM:abrahamsmith #
# http://euclid.dsl.wisc.edu/~abe     Molon Labe!       Defend your rights!   #
# [*]: The views I express are not necessarily those of the UW--Madison, etc. #

^ permalink raw reply	[flat|nested] 10+ messages in thread

* gsl_complex_rect undefined?
  2001-12-19 13:20 gsl_complex_rect undefined? Abraham David Smith
                   ` (2 preceding siblings ...)
  2001-12-19 13:20 ` Tisserand Patrice
@ 2001-12-19 13:20 ` Abraham David Smith
  2001-12-19 13:20 ` Fleur Kelpin
  4 siblings, 0 replies; 10+ messages in thread
From: Abraham David Smith @ 2001-12-19 13:20 UTC (permalink / raw)
  To: gsl-discuss

I am trying to use GSL 1.0 on an ix86 running an essentially normal RedHat
Linux 7.1 installation (with all of RedHat's published patches applied
to gcc, etc). 

Consider the following code snippet:

#include <iostream.h>
#include <gsl/gsl_complex.h>
void main()
  {
  gsl_complex a = gsl_complex_rect(1.0,2.0);
  cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
  GSL_SET_COMPLEX (&a, 3.0, 4.0);
  cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
  }

Compiling this with g++ gives:

testcomplex.cpp: In function `int main (...)':
testcomplex.cpp:9: `gsl_complex_rect' undeclared (first use this 
function)
testcomplex.cpp:9: (Each undeclared identifier is reported only once 
for each function it appears in.)


now consider the snippet:

#include <iostream.h>
#include <gsl/gsl_complex.h>
void main()
  {
  gsl_complex a;
  cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
  GSL_SET_COMPLEX (&a, 3.0, 4.0);
  cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl;
  }


this compiles and gives:
2.10391, 7.02217
3, 4



According to page 18 of the GSL manual
[ http://sources.redhat.com/gsl/ref/gsl-ref_5.html#SEC34 ], the function 
gsl_complex_rect should be defined.  What's up here?


-- 
# Abraham David Smith       UW--Madison Mathematics/Physics Undergraduate [*] #
# <abrahamsmith@students.wisc.edu>  Y!:abrahamdavidsmith  AOL-IM:abrahamsmith #
# http://euclid.dsl.wisc.edu/~abe     Molon Labe!       Defend your rights!   #
# [*]: The views I express are not necessarily those of the UW--Madison, etc. #

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2001-12-19 13:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-19 13:20 gsl_complex_rect undefined? Abraham David Smith
2001-12-10  6:38 ` Abraham David Smith
2001-12-18  9:30 ` Abraham David Smith
2001-12-19 13:20 ` Tisserand Patrice
2001-12-10 13:11   ` Tisserand Patrice
2001-12-18  9:39   ` Tisserand Patrice
2001-12-19 13:20 ` Abraham David Smith
2001-12-19 13:20 ` Fleur Kelpin
2001-12-10 12:37   ` Fleur Kelpin
2001-12-18  9:37   ` Fleur Kelpin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).