Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!samsung!xylogics!bu.edu!m2c!umvlsi!umaecs!lim From: lim@ecs.umass.edu Newsgroups: comp.lang.c Subject: Question: Representing complex numbers in C Message-ID: <12620.27cbe36f@ecs.umass.edu> Date: 27 Feb 91 16:50:55 GMT Lines: 24 Hi, I'd appreciated it if anyone out there can help me out with this problem. It concerns representation of complex numbers in C. I understand that Fortran has a data type COMPLEX that allows complex variables to be treated like any int, float, or double. I need to do the following in C: COMPLEX x, y, z; z = x + y; etc. The following won't work, obviously... struct { double real; double imaginary; } COMPLEX; Thanks in advance. Jonathan Lim