Rev 4874 | Rev 6099 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4874 | Rev 4921 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | #endif |
32 | #endif |
Line 33... | Line 33... | ||
33 | 33 | ||
34 | /* Natural log of 2 */ |
34 | /* Natural log of 2 */ |
Line 35... | Line -... | ||
35 | #define _M_LN2 0.693147180559945309417 |
- | |
36 | 35 | #define _M_LN2 0.693147180559945309417 |
|
37 | #if defined(__GNUC__) && \ |
- | |
38 | ( (__GNUC__ >= 4) || \ |
- | |
39 | ( (__GNUC__ >= 3) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 3) ) ) |
36 | |
Line 40... | Line 37... | ||
40 | 37 | #if __GNUC_PREREQ (3, 3) |
|
41 | /* gcc >= 3.3 implicitly defines builtins for HUGE_VALx values. */ |
38 | /* gcc >= 3.3 implicitly defines builtins for HUGE_VALx values. */ |
42 | 39 | ||
Line 141... | Line 138... | ||
141 | 138 | ||
Line 142... | Line 139... | ||
142 | #if !defined(__STRICT_ANSI__) || defined(__cplusplus) || __STDC_VERSION__ >= 199901L |
139 | #if !defined(__STRICT_ANSI__) || defined(__cplusplus) || __STDC_VERSION__ >= 199901L |
Line -... | Line 140... | ||
- | 140 | ||
- | 141 | /* ISO C99 types and macros. */ |
|
- | 142 | ||
- | 143 | /* FIXME: FLT_EVAL_METHOD should somehow be gotten from float.h (which is hard, |
|
- | 144 | * considering that the standard says the includes it defines should not |
|
- | 145 | * include other includes that it defines) and that value used. (This can be |
|
- | 146 | * solved, but autoconf has a bug which makes the solution more difficult, so |
|
- | 147 | * it has been skipped for now.) */ |
|
- | 148 | #if !defined(FLT_EVAL_METHOD) && defined(__FLT_EVAL_METHOD__) |
|
143 | 149 | #define FLT_EVAL_METHOD __FLT_EVAL_METHOD__ |
|
144 | /* ISO C99 types and macros. */ |
150 | #define __TMP_FLT_EVAL_METHOD |
145 | 151 | #endif /* FLT_EVAL_METHOD */ |
|
146 | #ifndef FLT_EVAL_METHOD |
152 | #if defined FLT_EVAL_METHOD |
- | 153 | #if FLT_EVAL_METHOD == 0 |
|
- | 154 | typedef float float_t; |
|
- | 155 | typedef double double_t; |
|
- | 156 | #elif FLT_EVAL_METHOD == 1 |
|
- | 157 | typedef double float_t; |
|
- | 158 | typedef double double_t; |
|
- | 159 | #elif FLT_EVAL_METHOD == 2 |
|
- | 160 | typedef long double float_t; |
|
- | 161 | typedef long double double_t; |
|
- | 162 | #else |
|
- | 163 | /* Implementation-defined. Assume float_t and double_t have been |
|
- | 164 | * defined previously for this configuration (e.g. config.h). */ |
|
- | 165 | #endif |
|
- | 166 | #else |
|
- | 167 | /* Assume basic definitions. */ |
|
- | 168 | typedef float float_t; |
|
147 | #define FLT_EVAL_METHOD 0 |
169 | typedef double double_t; |
- | 170 | #endif |
|
Line 148... | Line 171... | ||
148 | typedef float float_t; |
171 | #if defined(__TMP_FLT_EVAL_METHOD) |
149 | typedef double double_t; |
172 | #undef FLT_EVAL_METHOD |
150 | #endif /* FLT_EVAL_METHOD */ |
173 | #endif |
151 | 174 | ||
Line 353... | Line 376... | ||
353 | extern float gammaf _PARAMS((float)); |
376 | extern float gammaf _PARAMS((float)); |
354 | extern float lgammaf _PARAMS((float)); |
377 | extern float lgammaf _PARAMS((float)); |
355 | extern float erff _PARAMS((float)); |
378 | extern float erff _PARAMS((float)); |
356 | extern float erfcf _PARAMS((float)); |
379 | extern float erfcf _PARAMS((float)); |
357 | extern float log2f _PARAMS((float)); |
380 | extern float log2f _PARAMS((float)); |
358 | #if !defined(__cplusplus) |
- | |
359 | #define log2f(x) (logf (x) / (float_t) _M_LN2) |
- | |
360 | #endif |
- | |
361 | extern float hypotf _PARAMS((float, float)); |
381 | extern float hypotf _PARAMS((float, float)); |
362 | #endif /* ! defined (_REENT_ONLY) */ |
382 | #endif /* ! defined (_REENT_ONLY) */ |
Line 363... | Line 383... | ||
363 | 383 | ||
364 | /* On platforms where long double equals double. */ |
384 | /* On platforms where long double equals double. */ |