blob: 14af9a8e152038e5f15297063cd41729af4d9d27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
/*
* tclMacMath.h --
*
* This file is necessary because of Metrowerks CodeWarrior Pro 1
* on the Macintosh. With 8-byte doubles turned on, the definitions of
* sin, cos, acos, etc., are screwed up. They are fine as long as
* they are used as function calls, but if the function pointers
* are passed around and used, they will crash hard on the 68K.
*
* Copyright (c) 1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclMacMath.h,v 1.2 1998/09/14 18:40:05 stanton Exp $
*/
#ifndef _TCLMACMATH
#define _TCLMACMATH
#include <math.h>
#if defined(__MWERKS__) && !defined(__POWERPC__)
#if __option(IEEEdoubles)
# ifdef cos
# undef cos
# define cos cosd
# endif
# ifdef sin
# undef sin
# define sin sind
# endif
# ifdef tan
# undef tan
# define tan tand
# endif
# ifdef acos
# undef acos
# define acos acosd
# endif
# ifdef asin
# undef asin
# define asin asind
# endif
# ifdef atan
# undef atan
# define atan atand
# endif
# ifdef cosh
# undef cosh
# define cosh coshd
# endif
# ifdef sinh
# undef sinh
# define sinh sinhd
# endif
# ifdef tanh
# undef tanh
# define tanh tanhd
# endif
# ifdef exp
# undef exp
# define exp expd
# endif
# ifdef ldexp
# undef ldexp
# define ldexp ldexpd
# endif
# ifdef log
# undef log
# define log logd
# endif
# ifdef log10
# undef log10
# define log10 log10d
# endif
# ifdef fabs
# undef fabs
# define fabs fabsd
# endif
# ifdef sqrt
# undef sqrt
# define sqrt sqrtd
# endif
# ifdef fmod
# undef fmod
# define fmod fmodd
# endif
# ifdef atan2
# undef atan2
# define atan2 atan2d
# endif
# ifdef frexp
# undef frexp
# define frexp frexpd
# endif
# ifdef modf
# undef modf
# define modf modfd
# endif
# ifdef pow
# undef pow
# define pow powd
# endif
# ifdef ceil
# undef ceil
# define ceil ceild
# endif
# ifdef floor
# undef floor
# define floor floord
# endif
#endif
#endif
#if (defined(THINK_C) || defined(__MWERKS__))
#pragma export on
double hypotd(double x, double y);
#define hypot hypotd
#pragma export reset
#endif
#endif /* _TCLMACMATH */
|