From: "Andrew Hurrell" Newsgroups: comp.os.msdos.djgpp Subject: Re: Imaginary Numbers Date: 22 Nov 1999 14:19:37 GMT Organization: Customer of Planet Online Lines: 32 Message-ID: <01bf34f4$6fc96f40$232f893e@pa.wdi.co.uk> References: <383777ff AT news DOT desupernet DOT net> NNTP-Posting-Host: modem-35.spotted-trigger.dialup.pol.co.uk X-Trace: news6.svr.pol.co.uk 943280377 237 62.137.47.35 (22 Nov 1999 14:19:37 GMT) NNTP-Posting-Date: 22 Nov 1999 14:19:37 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: Microsoft Internet News 4.70.1155 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com David Pinkerton wrote in article <383777ff AT news DOT desupernet DOT net>... > Im working on making a small program that would display Fractals and the > like , but all the equations ive seen involved imaginary numbers. Is there a > biult in constant somwhere in djgpp for dealing with these. i tried setting > a variable equal to sqrt(-1) but it came back undefined. thanks alot GCC supports the C extension __complex__. Look at the info gcc files select the "C Extensions" menu and within that the "Complex" menu. This should get you started. If you then want to use functions of complex numbers I would suggest that you download Steve Moshier's Cephes package from www.netlib.org The complex number part of this package uses this C extension in a very user friendly manner and has some really cool maths capabilities. Eli Z gave me a neat trick that aids debuggin code written with complex arithmetic. Specifically, compile with the -gstabs+ switch rather than the basic -g3. It works really well - thanks Eli ! If you get stuck -email me !