Changeset 3b814c3a in mainline for uspace/lib/math/generic/round.c


Ignore:
Timestamp:
2018-08-30T19:12:03Z (6 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Children:
bbdca54
Parents:
ace1bca4
Message:

Add nearbyint() and PCUT-based tests for present rounding functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/math/generic/round.c

    race1bca4 r3b814c3a  
    4545float roundf(float val)
    4646{
    47         /* If the input is a nan, return a canonical nan. */
    48         if (isnan(val))
    49                 return __builtin_nanf("");
    50 
    5147        const int exp_bias = FLT_MAX_EXP - 1;
    5248        const int mant_bits = FLT_MANT_DIG - 1;
     
    7874double round(double val)
    7975{
    80         /* If the input is a nan, return a canonical nan. */
    81         if (isnan(val))
    82                 return __builtin_nan("");
    83 
    8476        const int exp_bias = DBL_MAX_EXP - 1;
    8577        const int mant_bits = DBL_MANT_DIG - 1;
Note: See TracChangeset for help on using the changeset viewer.