Changeset 3b814c3a in mainline for uspace/lib/math/generic/trunc.c
- Timestamp:
- 2018-08-30T19:12:03Z (7 years ago)
- Children:
- bbdca54
- Parents:
- ace1bca4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.