Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / libs / mathtrans / mathtrans_intern.h
blobb69f6eb2cf51b77aec27a82339ca9bf8b0fbee59
1 /*
2 Copyright © 1995-2004, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
9 #ifndef MATHTRANS_INTERN_H
10 #define MATHTRANS_INTERN_H
12 /* the following line is necessary so that the function headers are
13 created correctly and the functions can be compiled properly */
15 #define float LONG
18 /* This is a short file that contains a few things every mathffp function
19 needs */
21 #ifndef AROS_LIBCALL_H
22 # include <aros/libcall.h>
23 #endif
24 #ifndef PROTO_EXEC_H
25 # include <proto/exec.h>
26 #endif
27 #ifndef PROTO_MATHFFP_H
28 # include <proto/mathffp.h>
29 #endif
31 #ifndef EXEC_TYPES_H
32 # include <exec/types.h>
33 #endif
34 #ifndef EXEC_LIBRARIES_H
35 # include <exec/libraries.h>
36 #endif
38 #include <proto/mathtrans.h>
39 #include <libraries/mathffp.h>
41 /* internal prototypes */
43 LONG intern_SPLd(ULONG fnum);
44 LONG intern_SPisodd(ULONG fnum);
46 #define FFPMantisse_Mask 0xFFFFFF00 /* 24 bit for the mantisse */
47 #define FFPExponent_Mask 0x0000007F /* 7 bit for the exponent */
48 #define FFPSign_Mask 0x00000080
50 #define IEEESPMantisse_Mask 0x007FFFFF /* 23 bit for the mantisse */
51 #define IEEESPExponent_Mask 0x7F800000 /* 8 bit for the exponent */
52 #define IEEESPSign_Mask 0x80000000
54 #define Zero_Bit 0x00000004
55 #define Negative_Bit 0x00000008
56 #define Overflow_Bit 0x00000002
58 /* some Motorla fast floting point format constants */
59 #define FFP_zero 0x00000000
60 #define FFP_Pinfty 0xffffff7f
61 #define FFP_Ninfty 0xffffffff
62 #define FFP_NAN 0xffffffff
64 /* constants neccessary for log and log10 */
65 #define InvLde 0xb1721840 /* 1 / (log e / log 2) = log 2 / log e */
66 #define InvLd10 0x9a209b3f /* 1 / (log 10 / log 2) = log 2 / log 10 */
67 #define sqrtonehalf 0xb504f340 /* sqrt(1/2) */
70 /* constant necessary for exp */
72 #define exp1 0xadf85442
74 /* basic constants */
75 #define one 0x80000041 /* 1.00000000000000000000e+00 */
76 #define minusone 0x800000c1 /* -1.00000000000000000000e+00 */
77 #define two 0x80000042 /* 2.0 */
78 #define onehalf 0x80000040 /* 0.5 */
79 #define three 0xc0000042 /* 3.0 */
81 /* some more constants: pi, pi/2, pi/4 */
83 #define pi 0xc90fdb42 /* 3.14159265358979311600e+00 */
84 #define pio2 0xc90fdb41 /* 1.57079632679489655800e+00 */
85 #define pio4 0xc90fdb40 /* 0.7853981634e+00 */
87 /* for calculation of the sine */
88 #define sinf1 one /* 1/1! */
89 #define sinf2 0xaaaaabbe /* -1/3! */
90 #define sinf3 0x8888893a /* 1/5! */
91 #define sinf4 0xd00d01b4 /* -1/7! */
92 #define sinf5 0xb8ef1d2e /* 1/9! */
93 #define sinf6 0xd7322ba7 /* -1/11! */
95 /* for calculation of the cosine */
96 #define cosf1 one /* 1/1! */
97 #define cosf2 0x800000c0 /* -1/2! */
98 #define cosf3 0xaaaaab3c /* 1/4! */
99 #define cosf4 0xb60b61b7 /* -1/6! */
100 #define cosf5 0xd00d0131 /* 1/8! */
101 #define cosf6 0x93f27eab /* -1/10! */
103 /* constants neccessary for acos and asin */
104 #define pS0 0xaaaaaa3e /*a 1.66666666666666657415e-01 */
105 #define pS1 0xa6b090bf /*0 -3.25565818622400915405e-01 */
106 #define pS2 0xce0aa83e /*8 2.01212532134862925881e-01 */
107 #define pS3 0xa41146bc /*5 -4.00555345006794114027e-02 */
108 #define pS4 0xcf7f0436 /*3 7.91534994289814532176e-04 */
109 #define pS5 0x91ef0932 /*8 3.47933107596021167570e-05 */
111 #define qS1 0x99d138c2 /*8 -2.40339491173441421878e+00 */
112 #define qS2 0x81572c42 /*c 2.02094576023350569471e+00 */
113 #define qS3 0xb03361c0 /*0 -6.88283971605453293030e-01 */
114 #define qS4 0x9dc62e3d /*d 7.70381505559019352791e-02 */
116 #endif /* MATHTRANS_INTERN_H */