| www.delorie.com/archives/browse.cgi | search |
| 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 <marco_atzeri AT yahoo DOT it> |
| Subject: | complex number |
| To: | cygwin AT cygwin DOT com |
| MIME-Version: | 1.0 |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| 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 <iostream>
#include <complex>
int main()
{
double a =3D 0;
double b =3D 1. / a;
a +=3D 1;
std::cout << std::abs (std::complex<double> (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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |