X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_20 X-Spam-Check-By: sourceware.org Message-ID: <432458.55204.qm@web25004.mail.ukl.yahoo.com> Date: Wed, 1 Apr 2009 14:48:34 +0000 (GMT) From: Marco Atzeri Subject: complex number To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Dear All, I was trying to understand why this code #include #include int main() { double a =3D 0; double b =3D 1. / a; a +=3D 1; std::cout << std::abs (std::complex (b, a)) << '\n'; } produce Inf on most platform and NaN on cygwin. I found that newlib have the function cabs (complex absolute) but in cygwin the prototypes is extern double cabs(); so just a placeholder but not a useful function. There is any reason why cygwin is missing functional C99 complex functions ? For what I can see mingw has not such limitation in /usr/include/mingw/complex.h double __MINGW_ATTRIB_CONST cabs (double _Complex); Thanks Marco -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/