From owner-freebsd-alpha Sat Jul 8 1: 5:37 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from eel.radicalmedia.com (eel.radicalmedia.com [204.254.246.9]) by hub.freebsd.org (Postfix) with ESMTP id B6ED737B70C for ; Sat, 8 Jul 2000 01:05:29 -0700 (PDT) (envelope-from phiber@eel.radicalmedia.com) Received: (from phiber@localhost) by eel.radicalmedia.com (8.9.3/8.9.3) id EAA24588 for freebsd-alpha@FreeBSD.ORG; Sat, 8 Jul 2000 04:05:26 -0400 (EDT) Date: Sat, 8 Jul 2000 04:05:26 -0400 From: Mark Abene To: freebsd-alpha@FreeBSD.ORG Subject: Re: floating point troubles... Message-ID: <20000708040526.C22774@radicalmedia.com> References: <20000707222256.B22774@radicalmedia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: <20000707222256.B22774@radicalmedia.com>; from Mark Abene on Fri, Jul 07, 2000 at 10:22:56PM -0400 Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org For what it's worth, I added a signal(SIGFPE, SIG_IGN) to the appropriate place in the Smalltalk source, since the fpsetmask was having no effect. Now, it builds successfully, but this just seems "wrong". Also, some of the regression test results deviated from what was expected where floating point was concerned. Comments? -Mark On Fri, Jul 07, 2000 at 10:22:56PM -0400, Mark Abene wrote: > I'm trying to get Smalltalk from the ports collection working, but I'm running > into a recurring problem with floating point handling, ending up with an > exception and a core dump. I've reduced the problem to the following simple > program: > > #include > > main() > { > double num, base, exponent; > fp_except_t mask; > > mask = fpgetmask(); > fpsetmask(mask & ~(FP_X_INV|FP_X_OFL)); > > base = 10; exponent = 1000; > > num = pow(base, exponent); > } > > Unless I'm missing something, an fp exception shouldn't be happening because > I have them disabled. Compiling with -mieee or -mfp-regs makes no difference, > still dumps. If I do an outright fpsetmask(0) it still dumps. > For what it's worth, the preceeding code runs fine on an intel box. > > Anyone have any clues???? > > -Mark > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-alpha" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message