/* sEmuHDieee.c */
/* Copyright (c) 1994 Xerox Corporation. All rights reserved. */
/* Willie-s, June 29, 1994 1:01 pm PDT */
/*
*
* The ieee float constants here were taken from SunOS 4.1.3
*/
#include <math.h>
int
PCR←EmuHDieee←Dummy(double x)
{
/* SVID & X/Open */
x = erf(x);
x = erfc(x);
x = gamma(x);
x = hypot(x,x);
x = j0(x);
x = j1(x);
x = jn(11,x);
x = lgamma(x);
x = y0(x);
x = y1(x);
x = yn(11,x);
/* SVID */
x = acosh(x);
x = asinh(x);
x = atanh(x);
return 0;
}
int
fp←class(double x)
{
return (int) fpclass(x);
}
/*
* IEEE double precision constants
*/
static double align←←double = 0.0;
/* big-endian */
static long ln2x[] = { 0x3fe62e42, 0xfefa39ef };
static long ln2hix[] = { 0x3fe62e42, 0xfee00000 };
static long ln2lox[] = { 0x3dea39ef, 0x35793c76 };
static long NaNx[] = { 0x7fffffff, 0xffffffff };
static long sNaNx[] = { 0x7ff00000, 0x00000001 };
static long Infx[] = { 0x7ff00000, 0x00000000 };
static long two52x[] = { 0x43300000, 0x00000000 };
static long twom52x[] = { 0x3cb00000, 0x00000000 };
static long PI←RZx[] = { 0x400921fb, 0x54442d18 };
static long sqrt2x[] = { 0x3ff6a09e, 0x667f3bcd };/* rounded up */
static long sqrt2p1←hix[] = { 0x4003504f, 0x333f9de6 };
static long sqrt2p1←lox[] = { 0x3ca21165, 0xf626cdd5 };
static long fmaxx[] = { 0x7fefffff, 0xffffffff };
static long fminx[] = { 0x00000000, 0x00000001 };
static long fminnx[] = { 0x00100000, 0x00000000 };
static long fmaxsx[] = { 0x000fffff, 0xffffffff };
static long lnovftx[] = { 0x40862e42, 0xfefa39ef };/* chopped */
static long lnunftx[] = { 0xc0874910, 0xd52d3052 };/* ln(minf/2) chop*/
static long invln2x[] = { 0x3ff71547, 0x652b82fe };
#define ln2 (*(double*)ln2x)
#define NaN (*(double*)NaNx)
#define sNaN (*(double*)sNaNx)
#define Inf (*(double*)Infx)
#define two52 (*(double*)two52x)
#define twom52 (*(double*)twom52x)
#define ln2hi (*(double*)ln2hix)
#define ln2lo (*(double*)ln2lox)
#define PI←RZ (*(double*)PI←RZx)
#define sqrt2 (*(double*)sqrt2x)
#define sqrt2p1←hi (*(double*)sqrt2p1←hix)
#define sqrt2p1←lo (*(double*)sqrt2p1←lox)
#define fmax (*(double*)fmaxx)
#define fmin (*(double*)fminx)
#define fminn (*(double*)fminnx)
#define fmaxs (*(double*)fmaxsx)
#define lnovft (*(double*)lnovftx)
#define lnunft (*(double*)lnunftx)
#define invln2 (*(double*)invln2x)
double
min←subnormal(void)
{
return fmin;
}
double
max←subnormal(void)
{
return fmaxs;
}
double
min←normal(void)
{
return fminn;
}
double
max←normal(void)
{
return fmax;
}
double
infinity(void)
{
return Inf;
}
double
quiet←nan(long n)
{
return NaN;
}
double
signaling←nan(long n)
{
return sNaN;
}