VirtualBox

Ignore:
Timestamp:
Apr 7, 2022 1:17:57 PM (3 years ago)
Author:
vboxsync
Message:

IPRT: Added RTUInt128MulEx and RTUInt128MulU64Ex as well as a limited RTUInt256Xxx Api. bugref:9898

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/strformatfloat.cpp

    r94336 r94511  
    177177        *pszTmp++ = '1';
    178178        *pszTmp++ = 'm';
    179         pszTmp += RTStrFormatNumber(pszTmp, uFraction, 16, 2 + RTFLOAT64U_FRACTION_BITS / 4, 0,
     179        pszTmp += RTStrFormatNumber(pszTmp, uFraction, 16, 2 + (RTFLOAT64U_FRACTION_BITS + 3) / 4, 0,
    180180                                    RTSTR_F_SPECIAL | RTSTR_F_ZEROPAD | RTSTR_F_64BIT);
    181181
     
    191191        *pszTmp++ = '0';
    192192        *pszTmp++ = 'm';
    193         pszTmp += RTStrFormatNumber(pszTmp, uFraction, 16, 2 + RTFLOAT64U_FRACTION_BITS / 4, 0,
     193        pszTmp += RTStrFormatNumber(pszTmp, uFraction, 16, 2 + (RTFLOAT64U_FRACTION_BITS + 3) / 4, 0,
    194194                                    RTSTR_F_SPECIAL | RTSTR_F_ZEROPAD | RTSTR_F_64BIT);
    195195        if (fFlags & RTSTR_F_SPECIAL)
     
    224224 */
    225225static ssize_t rtStrFormatR80Worker(char *pszBuf, size_t cbBuf, bool const fSign, bool const fInteger,
    226                                     uint64_t const uFraction, uint16_t const uExponent, uint32_t fFlags)
     226                                    uint64_t const uFraction, uint16_t uExponent, uint32_t fFlags)
    227227{
    228228    char szTmp[160];
     
    250250                 : rtStrFormatCopyOutStr(pszBuf, cbBuf, RT_STR_TUPLE("+0"));
    251251        fDenormal = true;
     252        if (fInteger)
     253            uExponent = 1;
    252254    }
    253255    else if (uExponent == RTFLOAT80U_EXP_MAX)
     
    296298    *pszTmp++ = fInteger ? '1' : '0';
    297299    *pszTmp++ = 'm';
    298     pszTmp += RTStrFormatNumber(pszTmp, uFraction, 16, 2 + RTFLOAT80U_FRACTION_BITS / 4, 0,
     300    pszTmp += RTStrFormatNumber(pszTmp, uFraction, 16, 2 + (RTFLOAT80U_FRACTION_BITS + 3) / 4, 0,
    299301                                RTSTR_F_SPECIAL | RTSTR_F_ZEROPAD | RTSTR_F_64BIT);
    300302
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette