Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Dec 2001 16:19:07 +0100
From:      Bernd Walter <ticso@cicely9.cicely.de>
To:        freebsd-alpha@freebsd.org
Subject:   floating point exception masks?
Message-ID:  <20011221151906.GA97006@cicely9.cicely.de>

next in thread | raw e-mail | index | archive | help
Mozilla uses them on FreeBSD, but they are not available on alpha.

Here is a code fragment from
work/mozilla/extensions/transformiix/source/base/Double.cpp:

#include "primitives.h"
#include  <math.h>
#ifdef WIN32
#include <float.h>
#endif
//A trick to handle IEEE floating point exceptions on FreeBSD - E.D.
#ifdef __FreeBSD__
#include <floatingpoint.h>
#endif
#ifndef TX_EXE
#include "prdtoa.h"
#else
#include "stdlib.h"
#include "stdio.h"
#endif

/*
 * Utility class for doubles
 */

//A trick to handle IEEE floating point exceptions on FreeBSD - E.D.
#ifdef __FreeBSD__
fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML;
fp_except_t oldmask = fpsetmask(~allmask);
#endif


I have no clue about floating point miracles.
Are these expected implementations?

-- 
B.Walter              COSMO-Project         http://www.cosmo-project.de
ticso@cicely.de         Usergroup           info@cosmo-project.de


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?20011221151906.GA97006>