www.delorie.com/archives/browse.cgi | search |
Xref: | news2.mv.net comp.os.msdos.djgpp:904 |
From: | weiqigao AT crl DOT com (Weiqi Gao) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | acos(2.0) problem? |
Date: | Wed, 07 Feb 1996 22:35:39 GMT |
Organization: | CRL Dialup Internet Access |
Lines: | 47 |
Message-ID: | <4fb9h5$ik8@nntp.crl.com> |
NNTP-Posting-Host: | crl8.crl.com |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
After downloading the DJGPP v.2.00 from ftp.coast.net yesterday, I started my testing today. My first program is: ================== #include <math.h> #include <errno.h> #include <stdio.h> main() { acos(2.0); perror("Auch"); } ================== which I compiled with ===================== gcc -g test.c -o test ===================== I was expecting a output of "Auch: ERANGE Error", but instead I got the following ================================================================= Exiting due to signal SIGFPE Floating Point exception at eip=00001e72 eax=00000002 ebx=0004c140 ecx=0004f04c edx=00000033 esi=00000054 edi=00009ac4 ebp=00049a9c esp=00049a90 cs=00e7 ds=00ef es=00ef fs=0097 gs=00ff ss=00ef Call frame traceback EIPs: 0x00001e72 0x00001a8b ================================================================= I was on a P5-75/16MB/DOS6.22/4DOS. (And Microsoft's Visual C++ did make test.exe print the expected message. What did I do wrong? -- Weiqi Gao weiqigao AT crl DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |