Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Jul 2000 04:05:26 -0400
From:      Mark Abene <phiber@radicalmedia.com>
To:        freebsd-alpha@FreeBSD.ORG
Subject:   Re: floating point troubles...
Message-ID:  <20000708040526.C22774@radicalmedia.com>
In-Reply-To: <20000707222256.B22774@radicalmedia.com>; from Mark Abene on Fri, Jul 07, 2000 at 10:22:56PM -0400
References:  <20000707222256.B22774@radicalmedia.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <floatingpoint.h>
> 
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000708040526.C22774>