From: "Andrew Hurrell" Newsgroups: comp.os.msdos.djgpp Subject: Complex Numbers Date: Thu, 23 Sep 1999 22:42:32 +0100 Organization: Customer of Planet Online Lines: 47 Message-ID: <7se6ss$kob$1@news5.svr.pol.co.uk> NNTP-Posting-Host: modem-93.poet.dialup.pol.co.uk X-Trace: news5.svr.pol.co.uk 938122972 21259 62.136.105.93 (23 Sep 1999 21:42:52 GMT) NNTP-Posting-Date: 23 Sep 1999 21:42:52 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Dear All Firstly - if this a little off topic, my apologies, but this seems like a helpful NG so I though I give a go ;-) Secondly - if I've got the wrong end of the stick about programming issues that's 'coz I'm a scientist that dabbles with programming (tsk tsk - bloody scientists !) I'm involved with doing some number cruching which requires the use complex arithmetic. From what I could see in the FAQ the only support for this kind of thing was in C++ (not much use to me as I'm only just about confident enough in C :( ) I downloaded the complex arithmetic lib srcs from the Cephes directory within the Netlib repository (written by Steve Moshier - who appears to have done the long double library that is part of DJGPP), and as they claim to compile fine with GCC - C (i.e. not C++) I had a go. Sure enough they compiled fine and appeared at first glance to work OK. However, some questions have come to light 1) The complex math stuff appears to use a _complex_ data type within gcc. Have I missed this completly in the docs, or is it not supported under DJGPP. 2) Also the Cephes docs talk about C9X which I get the impression is going to be new standard for C, and again according to these docs, this new implementation will support Complex math. Does anyone know what the state of play on C9X - does DJGPP conform to this standard ? 3) When I try to debug anything (from within RHIDE) that uses complex math I am unable to see what data my variables contain (all variables report as being void - yet printf's give the correct answers). What am I doing wrong ? The nice thing about the Cephes stuff is that complex arithmetic is blissfully simple (e.g. adding two complex numbers is z1 + z2 - you don't appear to need functions like cadd(z1, z2)), but if anyone else has a similar lib for complex math, that I can debug, then I'm open to suggestions. Many thanks in advance for your assistance Andrew