Changeset 3b814c3a in mainline
- Timestamp:
- 2018-08-30T19:12:03Z (6 years ago)
- Children:
- bbdca54
- Parents:
- ace1bca4
- Files:
-
- 4 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile.common
race1bca4 r3b814c3a 244 244 $(USPACE_PATH)/lib/sif/test-libsif \ 245 245 $(USPACE_PATH)/lib/uri/test-liburi \ 246 $(USPACE_PATH)/lib/math/test-libmath \ 246 247 $(USPACE_PATH)/drv/bus/usb/xhci/test-xhci \ 247 248 $(USPACE_PATH)/app/bdsh/test-bdsh \ -
uspace/lib/c/include/float.h
race1bca4 r3b814c3a 32 32 // FIXME: <float.h> is freestanding. Just include the compiler-provided file. 33 33 34 #define FLT_MIN __FLT_MIN__ 35 #define FLT_DENORM_MIN __FLT_DENORM_MIN__ 36 #define FLT_EPSILON __FLT_EPSILON__ 37 34 38 #define FLT_MANT_DIG __FLT_MANT_DIG__ 35 39 #define DBL_MANT_DIG __DBL_MANT_DIG__ -
uspace/lib/c/include/math.h
race1bca4 r3b814c3a 312 312 #define copysignl __builtin_copysignl 313 313 314 #define nextafter __builtin_nextafter 315 #define nextafterf __builtin_nextafterf 316 #define nextafterl __builtin_nextafterl 317 314 318 #endif 315 319 -
uspace/lib/math/Makefile
race1bca4 r3b814c3a 39 39 generic/fabs.c \ 40 40 generic/fmod.c \ 41 generic/nearbyint.c \ 41 42 generic/round.c \ 42 43 generic/trig.c \ 43 44 generic/trunc.c 44 45 46 TEST_SOURCES = \ 47 test/rounding.c \ 48 test/main.c 49 45 50 include $(USPACE_PREFIX)/Makefile.common -
uspace/lib/math/generic/round.c
race1bca4 r3b814c3a 45 45 float roundf(float val) 46 46 { 47 /* If the input is a nan, return a canonical nan. */48 if (isnan(val))49 return __builtin_nanf("");50 51 47 const int exp_bias = FLT_MAX_EXP - 1; 52 48 const int mant_bits = FLT_MANT_DIG - 1; … … 78 74 double round(double val) 79 75 { 80 /* If the input is a nan, return a canonical nan. */81 if (isnan(val))82 return __builtin_nan("");83 84 76 const int exp_bias = DBL_MAX_EXP - 1; 85 77 const int mant_bits = DBL_MANT_DIG - 1; -
uspace/lib/math/generic/trunc.c
race1bca4 r3b814c3a 55 55 float truncf(float val) 56 56 { 57 /* If the input is a nan, return a canonical nan. */58 if (isnan(val))59 return __builtin_nanf("");60 61 57 const int exp_bias = FLT_MAX_EXP - 1; 62 58 const int mant_bits = FLT_MANT_DIG - 1; … … 99 95 double trunc(double val) 100 96 { 101 /* If the input is a nan, return a canonical nan. */102 if (isnan(val))103 return __builtin_nan("");104 105 97 const int exp_bias = DBL_MAX_EXP - 1; 106 98 const int mant_bits = DBL_MANT_DIG - 1;
Note:
See TracChangeset
for help on using the changeset viewer.