Changeset 9e7406a in mainline


Ignore:
Timestamp:
2019-02-12T19:59:51Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
69eaaeee
Parents:
401415a
git-author:
Matthieu Riolo <matthieu.riolo@…> (2019-02-12 19:38:33)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-02-12 19:59:51)
Message:

Revert "Ensures that the exponent is smallest possible value if 0.0"

This reverts commit f08da1c71ef0dddfb828f1eb6d5662e2f45989aa.
And corrects the pcut tests accordingly

Location:
uspace/lib/c
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/ieee_double.c

    r401415a r9e7406a  
    9292                if (ret.is_denormal) {
    9393                        ret.pos_val.significand = raw_significand;
    94                         if (raw_significand == 0) {
    95                                 ret.pos_val.exponent = -exponent_bias;
    96                         } else {
    97                                 ret.pos_val.exponent = 1 - exponent_bias;
    98                         }
    99 
     94                        ret.pos_val.exponent = 1 - exponent_bias;
    10095                        ret.is_accuracy_step = false;
    10196                } else {
  • uspace/lib/c/test/ieee_double.c

    r401415a r9e7406a  
    110110
    111111        PCUT_ASSERT_INT_EQUALS(0, d.pos_val.significand);
    112         PCUT_ASSERT_INT_EQUALS(-EXP_BIAS_UNDERFLOWED, d.pos_val.exponent);
    113112}
    114113
     
    127126
    128127        PCUT_ASSERT_INT_EQUALS(0, d.pos_val.significand);
    129         PCUT_ASSERT_INT_EQUALS(-EXP_BIAS_UNDERFLOWED, d.pos_val.exponent);
    130128}
    131129
Note: See TracChangeset for help on using the changeset viewer.