numexpr 2.10.2__cp313-cp313-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,150 @@
1
+ #ifndef NUMEXPR_MSVC_FUNCTION_STUBS_HPP
2
+ #define NUMEXPR_MSVC_FUNCTION_STUBS_HPP
3
+
4
+ /*********************************************************************
5
+ Numexpr - Fast numerical array expression evaluator for NumPy.
6
+
7
+ License: MIT
8
+ Author: See AUTHORS.txt
9
+
10
+ See LICENSE.txt for details about copyright and rights to use.
11
+ **********************************************************************/
12
+
13
+ /* Declare stub functions for MSVC. It turns out that single precision
14
+ definitions in <math.h> are actually #define'd and are not usable
15
+ as function pointers :-/ */
16
+
17
+ #if _MSC_VER < 1400 // 1310 == MSVC 7.1
18
+ /* Apparently, single precision functions are not included in MSVC 7.1 */
19
+
20
+ #define sqrtf(x) ((float)sqrt((double)(x)))
21
+ #define sinf(x) ((float)sin((double)(x)))
22
+ #define cosf(x) ((float)cos((double)(x)))
23
+ #define tanf(x) ((float)tan((double)(x)))
24
+ #define asinf(x) ((float)asin((double)(x)))
25
+ #define acosf(x) ((float)acos((double)(x)))
26
+ #define atanf(x) ((float)atan((double)(x)))
27
+ #define sinhf(x) ((float)sinh((double)(x)))
28
+ #define coshf(x) ((float)cosh((double)(x)))
29
+ #define tanhf(x) ((float)tanh((double)(x)))
30
+ #define asinhf(x) ((float)asinh((double)(x)))
31
+ #define acoshf(x) ((float)acosh((double)(x)))
32
+ #define atanhf(x) ((float)atanh((double)(x)))
33
+ #define logf(x) ((float)log((double)(x)))
34
+ #define log1pf(x) ((float)log1p((double)(x)))
35
+ #define log10f(x) ((float)log10((double)(x)))
36
+ #define expf(x) ((float)exp((double)(x)))
37
+ #define expm1f(x) ((float)expm1((double)(x)))
38
+ #define fabsf(x) ((float)fabs((double)(x)))
39
+ #define fmodf(x, y) ((float)fmod((double)(x), (double)(y)))
40
+ #define atan2f(x, y) ((float)atan2((double)(x), (double)(y)))
41
+ #define ceilf(x) ((float)ceil((double)(x)))
42
+
43
+ /* The next are directly called from interp_body.cpp */
44
+ #define powf(x, y) ((float)pow((double)(x), (double)(y)))
45
+ #define floorf(x) ((float)floor((double)(x)))
46
+
47
+ #endif // _MSC_VER < 1400
48
+
49
+
50
+ /* Now the actual stubs */
51
+
52
+ inline float sqrtf2(float x) {
53
+ return sqrtf(x);
54
+ }
55
+
56
+ inline float sinf2(float x) {
57
+ return sinf(x);
58
+ }
59
+
60
+ inline float cosf2(float x) {
61
+ return cosf(x);
62
+ }
63
+
64
+ inline float tanf2(float x) {
65
+ return tanf(x);
66
+ }
67
+
68
+ inline float asinf2(float x) {
69
+ return asinf(x);
70
+ }
71
+
72
+ inline float acosf2(float x) {
73
+ return acosf(x);
74
+ }
75
+
76
+ inline float atanf2(float x) {
77
+ return atanf(x);
78
+ }
79
+
80
+ inline float sinhf2(float x) {
81
+ return sinhf(x);
82
+ }
83
+
84
+ inline float coshf2(float x) {
85
+ return coshf(x);
86
+ }
87
+
88
+ inline float tanhf2(float x) {
89
+ return tanhf(x);
90
+ }
91
+
92
+ inline float asinhf2(float x) {
93
+ return asinhf(x);
94
+ }
95
+
96
+ inline float acoshf2(float x) {
97
+ return acoshf(x);
98
+ }
99
+
100
+ inline float atanhf2(float x) {
101
+ return atanhf(x);
102
+ }
103
+
104
+ inline float logf2(float x) {
105
+ return logf(x);
106
+ }
107
+
108
+ inline float log1pf2(float x) {
109
+ return log1pf(x);
110
+ }
111
+
112
+ inline float log10f2(float x) {
113
+ return log10f(x);
114
+ }
115
+
116
+ inline float expf2(float x) {
117
+ return expf(x);
118
+ }
119
+
120
+ inline float expm1f2(float x) {
121
+ return expm1f(x);
122
+ }
123
+
124
+ inline float fabsf2(float x) {
125
+ return fabsf(x);
126
+ }
127
+
128
+ inline float fmodf2(float x, float y) {
129
+ return fmodf(x, y);
130
+ }
131
+
132
+ inline float atan2f2(float x, float y) {
133
+ return atan2f(x, y);
134
+ }
135
+
136
+ // Needed for allowing the internal casting in numexpr machinery for
137
+ // conjugate operations
138
+ inline float fconjf2(float x) {
139
+ return x;
140
+ }
141
+
142
+ inline float ceilf2(float x) {
143
+ return ceilf(x);
144
+ }
145
+
146
+ inline float floorf2(float x) {
147
+ return floorf(x);
148
+ }
149
+
150
+ #endif // NUMEXPR_MSVC_FUNCTION_STUBS_HPP