source: sasview/sansmodels/src/sans/models/libigor/winFuncs.h @ e161fac

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 e161fac was 6a2c931, checked in by Mathieu Doucet <doucetm@…>, 13 years ago

Re #5 fixing samsmodels compilation on MSVC

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/* winFuncs.h
2   Definitions for missing math lib functions
3   Andrew Jackson, October 2007
4   */
5
6double fmax(double x, double y);
7//long double fmaxl (long double x, long double y);
8//float fmaxf (float x, float y);
9
10double fmin(double x, double y);
11
12double trunc(double x);
13//long double truncl(long double x);
14//float truncf(float x);
15
16double erf(double x);
17//long double erfl(long double x);
18//float erff (float x);
19//double erfc(double x);
20//long double erfcl(long double x);
21//float erfcf(float x;
22
23
24// Define INFINITY and NAN
25typedef union { unsigned char __c[4]; float __f; } __huge_valf_t;
26
27# if __BYTE_ORDER == __BIG_ENDIAN
28#  define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 }
29# endif
30# if __BYTE_ORDER == __LITTLE_ENDIAN
31#  define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f }
32# endif
33
34static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
35# define INFINITY  (__huge_valf.__f)
36
37
38# if __BYTE_ORDER == __BIG_ENDIAN
39#  define __nan_bytes   { 0x7f, 0xc0, 0, 0 }
40# endif
41# if __BYTE_ORDER == __LITTLE_ENDIAN
42#  define __nan_bytes   { 0, 0, 0xc0, 0x7f }
43# endif
44
45static union { unsigned char __c[4]; float __d; } __nan_union;
46# define NAN  (__nan_union.__d)
47
Note: See TracBrowser for help on using the repository browser.