Ticket #6627: nonfinite_num_facets_formatting_2.hpp.patch

File nonfinite_num_facets_formatting_2.hpp.patch, 1.1 KB (added by Paul A. Bristow, 11 years ago)

Patch to try to treat unsigned zero as normal value.

  • nonfinite_num_facets.hpp

     
    118118          break;
    119119
    120120        case FP_ZERO:
    121           if(flags_ & signed_zero) {
     121          if(flags_ & signed_zero)
     122          { // Distinguish between positive and negative zero.
    122123            if((boost::math::signbit)(val))
     124            {
    123125              put_num_and_fill(it, iosb, "-", "0", fill);
     126            }
    124127            else if(iosb.flags() & std::ios_base::showpos)
     128            {
    125129              put_num_and_fill(it, iosb, "+", "0", fill);
     130            }
    126131            else
     132            { // No sign.
    127133              put_num_and_fill(it, iosb, "", "0", fill);
     134            }
    128135          }
    129           else
    130             put_num_and_fill(it, iosb, "", "0", fill);
    131           break;
     136          //else
     137          //{ //
     138          //  put_num_and_fill(it, iosb, "", "0", fill);
     139          //}
     140          //break;
    132141
    133142        default:
    134143          it = std::num_put<CharType, OutputIterator>::do_put(