Changeset 0d49efb


Ignore:
Timestamp:
Oct 9, 2023, 8:02:42 AM (9 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
946a6e4, eb779d5
Parents:
4817662
Message:

allow precision < 3 for manipulator eng

Location:
libcfa/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.cfa

    r4817662 r0d49efb  
    1111// Created On       : Wed May 27 17:56:53 2015
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Sat Sep  2 14:42:01 2023
    14 // Update Count     : 1561
     13// Last Modified On : Sun Oct  8 12:10:21 2023
     14// Update Count     : 1564
    1515//
    1616
     
    651651                exp10 = floor( exp10, 3 ); \
    652652                value *= pow( 10.0, -exp10 ); \
    653                 if ( pc <= 3 ) pc = 3; \
     653                if ( pc < 0 ) pc = 3; \
    654654        } /* eng */ \
    655655\
  • libcfa/src/iostream.hfa

    r4817662 r0d49efb  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Sep  2 14:42:13 2023
    13 // Update Count     : 567
     12// Last Modified On : Sun Oct  8 12:02:55 2023
     13// Update Count     : 568
    1414//
    1515
     
    243243        _Ostream_Manip(T) hex( T val ) { return (_Ostream_Manip(T))@{ val, 1, 0, 'a', { .all : 0 } }; } \
    244244        _Ostream_Manip(T) sci( T val ) { return (_Ostream_Manip(T))@{ val, 1, 0, 'e', { .all : 0 } }; } \
    245         _Ostream_Manip(T) eng( T val ) { return (_Ostream_Manip(T))@{ val, 1, 0, 'g', { .flags.eng : true } }; } \
     245        _Ostream_Manip(T) eng( T val ) { return (_Ostream_Manip(T))@{ val, 1, -1, 'g', { .flags.eng : true } }; } \
    246246        _Ostream_Manip(T) wd( unsigned int w, T val ) { return (_Ostream_Manip(T))@{ val, w, 0, 'g', { .all : 0 } }; } \
    247247        _Ostream_Manip(T) wd( unsigned int w, unsigned int pc, T val ) { return (_Ostream_Manip(T))@{ val, w, pc, 'f', { .flags.pc : true } }; } \
Note: See TracChangeset for help on using the changeset viewer.