www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/09/06/14:40:13

Date: Fri, 6 Sep 1996 23:38:51 +0000 ( )
From: Gurunandan R Bhat <grbhat AT unigoa DOT ernet DOT in>
To: djgpp AT delorie DOT com
Subject: complex
Message-Id: <Pine.LNX.3.91.960906232526.718A-100000@aditya.unigoa.ernet.in>
Mime-Version: 1.0

greetings,

	i use a lot of complex numbers in my numerical programs. i have 
ever since i started using djgpp, done so in the following manner:

#include<_complex.h>   /* note the underscore*/
...
...
int main(void)
{
	Complex c1, c2;   /* note capitalisation */
...
...
	c1 = Complex(1.0, 1.0);
	c2 = log(c1)
...
...
}

this has always worked for me, though i must confess i have never had
occasion to port this kind of code to other platforms. in a recent (three
weeks ago?) posting (weiqi?) it was mentioned that this is now obsolete
and is moreover not quite ansi. the reason had to do with templates etc,
something that, i, with almost no deep knowledge of c++, did not
understand. 

i would be grateful then, if some one could post the canonical syntax for 
the above sketchy code which is ansi conformant and as portable as possible

thanks 

gurunandan bhat
dept. of physics
goa university
goa, india.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019