ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change
on this file since c93122e was
79492222,
checked in by krzywon, 10 years ago
|
Changed the file and folder names to remove all SANS references.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Rev | Line | |
---|
[230f479] | 1 | #if !defined(WINFUNCS_H) |
---|
| 2 | #define WINFUNCS_H |
---|
| 3 | /* winFuncs.h |
---|
| 4 | Definitions for missing math lib functions |
---|
| 5 | Andrew Jackson, October 2007 |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | double fmax(double x, double y); |
---|
| 9 | //long double fmaxl (long double x, long double y); |
---|
| 10 | //float fmaxf (float x, float y); |
---|
| 11 | |
---|
| 12 | double fmin(double x, double y); |
---|
| 13 | |
---|
| 14 | double trunc(double x); |
---|
| 15 | //long double truncl(long double x); |
---|
| 16 | //float truncf(float x); |
---|
| 17 | |
---|
| 18 | double erf(double x); |
---|
| 19 | //long double erfl(long double x); |
---|
| 20 | //float erff (float x); |
---|
| 21 | //double erfc(double x); |
---|
| 22 | //long double erfcl(long double x); |
---|
| 23 | //float erfcf(float x; |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | // Define INFINITY and NAN |
---|
| 27 | typedef union { unsigned char __c[4]; float __f; } __huge_valf_t; |
---|
| 28 | |
---|
| 29 | # if __BYTE_ORDER == __BIG_ENDIAN |
---|
| 30 | # define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 } |
---|
| 31 | # endif |
---|
| 32 | # if __BYTE_ORDER == __LITTLE_ENDIAN |
---|
| 33 | # define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f } |
---|
| 34 | # endif |
---|
| 35 | |
---|
| 36 | static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes }; |
---|
| 37 | # define INFINITY (__huge_valf.__f) |
---|
| 38 | |
---|
| 39 | |
---|
| 40 | # if __BYTE_ORDER == __BIG_ENDIAN |
---|
| 41 | # define __nan_bytes { 0x7f, 0xc0, 0, 0 } |
---|
| 42 | # endif |
---|
| 43 | # if __BYTE_ORDER == __LITTLE_ENDIAN |
---|
| 44 | # define __nan_bytes { 0, 0, 0xc0, 0x7f } |
---|
| 45 | # endif |
---|
| 46 | |
---|
| 47 | static union { unsigned char __c[4]; float __d; } __nan_union; |
---|
| 48 | # define NAN (__nan_union.__d) |
---|
| 49 | |
---|
| 50 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.