Changeset 834 for cpp/PrintFloat/Dragon4.cpp
- Timestamp:
- 12/05/18 20:59:34 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/PrintFloat/Dragon4.cpp
r823 r834 24 24 25 25 #include "Dragon4.h" 26 #include "Math .h"26 #include "MathDragon4.h" 27 27 #include <math.h> 28 28 … … 866 866 // floor( log10(v) ) < ceil( (mantissaHighBitIdx + exponent) * log10(2) ) <= floor( log10(v) ) + 1 867 867 const tF64 log10_2 = 0.30102999566398119521373889472449; 868 868 tS32 digitExponent = (tS32)(ceil(tF64((tS32)mantissaHighBitIdx + exponent) * log10_2 - 0.69)); 869 869 870 870 // if the digit exponent is smaller than the smallest desired digit for fractional cutoff, … … 970 970 // This is safe because (2^28 - 1) = 268435455 which is less than 429496729. This means 971 971 // that all values with a highest bit at index 27 are within range. 972 972 tU32 hiBlockLog2 = LogBase2(hiBlock); 973 973 RJ_ASSERT(hiBlockLog2 < 3 || hiBlockLog2 > 27); 974 974 tU32 shift = (32 + 27 - hiBlockLog2) % 32;
Note: See TracChangeset
for help on using the changeset viewer.