Path: utzoo!attcan!uunet!cbmvax!daveh From: daveh@cbmvax.UUCP (Dave Haynie) Newsgroups: comp.sys.amiga Subject: Re: Complex Numbers in C Message-ID: <5655@cbmvax.UUCP> Date: 10 Jan 89 16:51:59 GMT References: <8166@orstcs.CS.ORST.EDU> Organization: Commodore Technology, West Chester, PA Lines: 27 in article <8166@orstcs.CS.ORST.EDU>, usenet@orstcs.CS.ORST.EDU (Usenet programs owner) says: > Sender:R C Nelson > Are there any library functions out there for dealing with complex math, > or will I end up writing them all myself? Ugh! (That is the one thing > FORTRAN has going for it.) I'm looking for C libraries.... > Thnx, > Rolf, With no fancy sigs yet... If you're doing lots of stuff with complex numbers, I'd recommend C++ from Lattice. It comes with a complex number library, including the following functions: cos(), cosh(), exp(), log(), pow(), sin(), sinh(), sqrt(), abs(), real(), imag(), polar(), conj(); and operators: +, -, *, /, ==, !=, +=, -=, *=, /=, >>, <<. Since C++ is extensible, you work it pretty much like you might in fortran: complex a, b(1,0), c(0,1), d(5.3,23.7); a = (b + d) * c; And so on. I -- Dave Haynie "The 32 Bit Guy" Commodore-Amiga "The Crew That Never Rests" {uunet|pyramid|rutgers}!cbmvax!daveh PLINK: D-DAVE H BIX: hazy Amiga -- It's not just a job, it's an obsession