2 Copyright © 1995-2004, The AROS Development Team. All rights reserved.
6 #ifndef __MATHIEEESINGTRANS_INTERN_H__
7 #define __MATHIEEESINGTRANS_INTERN_H__
9 /* the following line is necessary so that the function headers are
10 created correctly and the functions can be compiled properly */
14 /* This is a short file that contains a few things every mathieeesingtrans
17 #ifndef AROS_LIBCALL_H
18 # include <aros/libcall.h>
20 #ifndef PROTO_MATHIEEESINGTRANS_H
21 # include <proto/mathieeesingbas.h>
25 # include <exec/types.h>
27 #ifndef EXEC_LIBRARIES_H
28 # include <exec/libraries.h>
34 #include <proto/exec.h>
35 #include <libraries/mathieeesp.h>
36 #include <proto/mathieeesingtrans.h>
39 /* Internal prototypes */
41 LONG
intern_IEEESPLd(ULONG fnum
);
42 LONG
intern_IEEESPisodd(LONG fnum
);
45 #define IEEESPMantisse_Mask 0x007FFFFF /* 23 bit for the mantisse */
46 #define IEEESPExponent_Mask 0x7F800000 /* 8 bit for the exponent */
47 #define IEEESPSign_Mask 0x80000000 /* 1 bit for the sign */
49 #define Zero_Bit 0x00000004 /* Flags of the 680xx CPU */
50 #define Negative_Bit 0x00000008 /* */
51 #define Overflow_Bit 0x00000002 /* */
53 #define IEEESP_zero 0x00000000 /* */
54 #define IEEESP_Pinfty 0x7f800000 /* +infinity */
55 #define IEEESP_Ninfty 0xff800000 /* -infinity */
56 #define IEEESP_NAN 0xffffffff /* illegal state */
58 /* some constants we need */
60 #define InvLde 0x3f317218 /* 1 / (log e / log 2) = log 2 / log e */
61 #define InvLd10 0x3e9a209a /* 1 / (log 10 / log 2) = log 2 / log 10 */
63 #define sqrtonehalf 0x3fb504f3 /* sqrt(1/2) */
66 #define one 0x3f800000 /* 1.00000000000000000000e+00 */
67 #define minusone 0xbf800000 /* -1.00000000000000000000e+00 */
68 #define two 0x40000000 /* 2.0 */
69 #define onehalf 0x3f000000 /* 0.5 */
70 #define three 0x40400000 /* 3.0 */
72 #define pi 0x40490fdb /* 3.14159265358979311600e+00 */
73 #define pio2 0x3fc90fdb /* 1.57079632679489655800e+00 */
74 #define pio4 0x3f490fdb /* 0.7853981634e+00 */
76 /* for calculation of the sine */
77 #define sinf1 one /* 1/1! */
78 #define sinf2 0xbe2aaaab /* -1/3! */
79 #define sinf3 0x3c088889 /* 1/5! */
80 #define sinf4 0xb9500d01 /* -1/7! */
81 #define sinf5 0x3638ef1d /* 1/9! */
82 #define sinf6 0xb2d7322b /* -1/11! */
84 /* for calculation of the cosine */
85 #define cosf1 one /* 1/1! */
86 #define cosf2 0xbf000000 /* -1/2! */
87 #define cosf3 0x3d2aaaab /* 1/4! */
88 #define cosf4 0xbab60b61 /* -1/6! */
89 #define cosf5 0x37d00d01 /* 1/8! */
90 #define cosf6 0xb493f27e /* -1/10! */
92 #define pS0 0x3e2aaaaa /* 1.66666666666666657415e-01 */
93 #define pS1 0xbea6b090 /* -3.25565818622400915405e-01 */
94 #define pS2 0x3e4e0aa8 /* 2.01212532134862925881e-01 */
95 #define pS3 0xbd241146 /* -4.00555345006794114027e-02 */
96 #define pS4 0x3a4f7f04 /* 7.91534994289814532176e-04 */
97 #define pS5 0x3811ef09 /* 3.47933107596021167570e-05 */
99 #define qS1 0xc019d138 /* -2.40339491173441421878e+00 */
100 #define qS2 0x4001572c /* 2.02094576023350569471e+00 */
101 #define qS3 0xbf303361 /* -6.88283971605453293030e-01 */
102 #define qS4 0x3d9dc62e /* 7.70381505559019352791e-02 */
105 #include <aros/m68k/libcall_cc.h>
108 #endif /* __MATHIEEESINGTRANS_INTERN_H__ */