~ubuntu-branches/ubuntu/raring/python-scipy/raring-proposed

« back to all changes in this revision

Viewing changes to Lib/special/cephes/mconf_BE.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-07 14:12:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070107141212-mm0ebkh5b37hcpzn
* Remove build dependency on python-numpy-dev.
* python-scipy: Depend on python-numpy instead of python-numpy-dev.
* Package builds on other archs than i386. Closes: #402783.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*                                                      mconf.h
2
 
 *
3
 
 *      Common include file for math routines
4
 
 *
5
 
 *
6
 
 *
7
 
 * SYNOPSIS:
8
 
 *
9
 
 * #include "mconf.h"
10
 
 *
11
 
 *
12
 
 *
13
 
 * DESCRIPTION:
14
 
 *
15
 
 * This file contains definitions for error codes that are
16
 
 * passed to the common error handling routine mtherr()
17
 
 * (which see).
18
 
 *
19
 
 * The file also includes a conditional assembly definition
20
 
 * for the type of computer arithmetic (IEEE, DEC, Motorola
21
 
 * IEEE, or UNKnown).
22
 
 * 
23
 
 * For Digital Equipment PDP-11 and VAX computers, certain
24
 
 * IBM systems, and others that use numbers with a 56-bit
25
 
 * significand, the symbol DEC should be defined.  In this
26
 
 * mode, most floating point constants are given as arrays
27
 
 * of octal integers to eliminate decimal to binary conversion
28
 
 * errors that might be introduced by the compiler.
29
 
 *
30
 
 * For little-endian computers, such as IBM PC, that follow the
31
 
 * IEEE Standard for Binary Floating Point Arithmetic (ANSI/IEEE
32
 
 * Std 754-1985), the symbol IBMPC should be defined.  These
33
 
 * numbers have 53-bit significands.  In this mode, constants
34
 
 * are provided as arrays of hexadecimal 16 bit integers.
35
 
 *
36
 
 * Big-endian IEEE format is denoted MIEEE.  On some RISC
37
 
 * systems such as Sun SPARC, double precision constants
38
 
 * must be stored on 8-byte address boundaries.  Since integer
39
 
 * arrays may be aligned differently, the MIEEE configuration
40
 
 * may fail on such machines.
41
 
 *
42
 
 * To accommodate other types of computer arithmetic, all
43
 
 * constants are also provided in a normal decimal radix
44
 
 * which one can hope are correctly converted to a suitable
45
 
 * format by the available C language compiler.  To invoke
46
 
 * this mode, define the symbol UNK.
47
 
 *
48
 
 * An important difference among these modes is a predefined
49
 
 * set of machine arithmetic constants for each.  The numbers
50
 
 * MACHEP (the machine roundoff error), MAXNUM (largest number
51
 
 * represented), and several other parameters are preset by
52
 
 * the configuration symbol.  Check the file const.c to
53
 
 * ensure that these values are correct for your computer.
54
 
 *
55
 
 * Configurations NANS, INFINITIES, MINUSZERO, and DENORMAL
56
 
 * may fail on many systems.  Verify that they are supposed
57
 
 * to work on your computer.
58
 
 */
59
 
 
60
 
/*
61
 
Cephes Math Library Release 2.3:  June, 1995
62
 
Copyright 1984, 1987, 1989, 1995 by Stephen L. Moshier
63
 
*/
64
 
 
65
 
 
66
 
/* Constant definitions for math error conditions
67
 
 */
68
 
 
69
 
#define DOMAIN          1       /* argument domain error */
70
 
#define SING            2       /* argument singularity */
71
 
#define OVERFLOW        3       /* overflow range error */
72
 
#define UNDERFLOW       4       /* underflow range error */
73
 
#define TLOSS           5       /* total loss of precision */
74
 
#define PLOSS           6       /* partial loss of precision */
75
 
#define TOOMANY         7       /* too many iterations */
76
 
#define MAXITER        500
77
 
 
78
 
#define EDOM            33
79
 
#define ERANGE          34
80
 
 
81
 
/* Complex numeral.  */
82
 
typedef struct
83
 
        {
84
 
        double r;
85
 
        double i;
86
 
        } cmplx;
87
 
 
88
 
/* Long double complex numeral.  */
89
 
/*
90
 
typedef struct
91
 
        {
92
 
        long double r;
93
 
        long double i;
94
 
        } cmplxl;
95
 
*/
96
 
 
97
 
/* Type of computer arithmetic */
98
 
 
99
 
/* PDP-11, Pro350, VAX:
100
 
 */
101
 
/* #define DEC 1 */
102
 
 
103
 
/* Not sure about these pdp defines */
104
 
#if defined(vax) || defined(__vax__) || defined(decvax) || \
105
 
    defined(__decvax__) || defined(pro350) || defined(pdp11)
106
 
#define DEC 1  
107
 
 
108
 
#elif defined(ns32000) || defined(sun386) || \
109
 
    defined(i386) || defined(MIPSEL) || defined(_MIPSEL) || \
110
 
    defined(BIT_ZERO_ON_RIGHT) || defined(__alpha__) || defined(__alpha) || \
111
 
    defined(sequent) || defined(i386) || \
112
 
    defined(__ns32000__) || defined(__sun386__) || defined(__i386__)
113
 
#define IBMPC 1   /* Intel IEEE, low order words come first */
114
 
#define BIGENDIAN 0
115
 
 
116
 
#elif defined(sel) || defined(pyr) || defined(mc68000) || defined (m68k) || \
117
 
          defined(is68k) || defined(tahoe) || defined(ibm032) || \
118
 
          defined(ibm370) || defined(MIPSEB) || defined(_MIPSEB) || \
119
 
          defined(__convex__) || defined(DGUX) || defined(hppa) || \
120
 
          defined(apollo) || defined(_CRAY) || defined(__hppa) || \
121
 
          defined(__hp9000) || defined(__hp9000s300) || \
122
 
          defined(__hp9000s700) || defined(__AIX) || defined(_AIX) ||\
123
 
          defined(__pyr__) || defined(__mc68000__) || defined(__sparc) ||\
124
 
          defined(_IBMR2) || defined (BIT_ZERO_ON_LEFT) 
125
 
#define MIEEE 1     /* Motorola IEEE, high order words come first */
126
 
#define BIGENDIAN 1
127
 
 
128
 
#else 
129
 
#define UNK 1        /* Machine not IEEE or DEC, 
130
 
                        constants given in decimal format */
131
 
#define BIGENDIAN 1   /* This is a BE file */
132
 
#endif
133
 
 
134
 
 
135
 
/* UNKnown arithmetic, invokes coefficients given in
136
 
 * normal decimal format.  Beware of range boundary
137
 
 * problems (MACHEP, MAXLOG, etc. in const.c) and
138
 
 * roundoff problems in pow.c:
139
 
 * (Sun SPARCstation)
140
 
 */
141
 
/* #define UNK 1 */
142
 
 
143
 
/* Define this `volatile' if your compiler thinks
144
 
 * that floating point arithmetic obeys the associative
145
 
 * and distributive laws.  It will defeat some optimizations
146
 
 * (but probably not enough of them).
147
 
 *
148
 
 * #define VOLATILE volatile
149
 
 */
150
 
#define VOLATILE
151
 
 
152
 
/* For 12-byte long doubles on an i386, pad a 16-bit short 0
153
 
 * to the end of real constants initialized by integer arrays.
154
 
 *
155
 
 * #define XPD 0,
156
 
 *
157
 
 * Otherwise, the type is 10 bytes long and XPD should be
158
 
 * defined blank (e.g., Microsoft C).
159
 
 *
160
 
 * #define XPD
161
 
 */
162
 
#define XPD 0,
163
 
 
164
 
/* Define to support tiny denormal numbers, else undefine. */
165
 
#define DENORMAL 1
166
 
 
167
 
/* Define to ask for infinity support, else undefine. */
168
 
#define INFINITIES 1
169
 
#ifdef NOINFINITIES
170
 
#undef INFINITIES
171
 
#endif
172
 
 
173
 
/* Define to ask for support of numbers that are Not-a-Number,
174
 
   else undefine.  This may automatically define INFINITIES in some files. */
175
 
#define NANS 1
176
 
#ifdef NONANS
177
 
#undef NANS
178
 
#endif
179
 
 
180
 
/* Define to distinguish between -0.0 and +0.0.  */
181
 
#define MINUSZERO 1
182
 
 
183
 
/* Define 1 for ANSI C atan2() function
184
 
   See atan.c and clog.c. */
185
 
#define ANSIC 1
186
 
 
187
 
/* Get ANSI function prototypes, if you want them. */
188
 
#ifdef __STDC__
189
 
#define ANSIPROT
190
 
#include "protos.h"
191
 
#else
192
 
int mtherr();
193
 
#endif
194
 
 
195
 
/* Variable for error reporting.  See mtherr.c.  */
196
 
extern int merror;