Ignore:
Timestamp:
Feb 11, 2013, 4:27:49 PM (7 years ago)
Author:
sam
Message:

math: minor improvements to the Remez exchange algorithm.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/math/real.cpp

    r2322 r2394  
    13621362    for (int i = 0; i < BIGITS; i++)
    13631363        std::printf(" %08x", m_mantissa[i]);
    1364     std::printf("\n");
    13651364}
    13661365
     
    13711370    char *buf = new char[ndigits + 32 + 10];
    13721371    real::sprintf(buf, ndigits);
    1373     std::printf("%s\n", buf);
     1372    std::printf("%s", buf);
    13741373    delete[] buf;
    13751374}
     
    13871386    if (!x)
    13881387    {
    1389         std::strcpy(str, "0.0\n");
     1388        std::strcpy(str, "0.0");
    13901389        return;
    13911390    }
     
    14151414    /* Print exponent information */
    14161415    if (exponent)
    1417         str += std::sprintf(str, "e%c%i", exponent > 0 ? '+' : '-', -exponent);
     1416        str += std::sprintf(str, "e%c%i",
     1417                            exponent >= 0 ? '+' : '-', lol::abs(exponent));
    14181418
    14191419    *str++ = '\0';
Note: See TracChangeset for help on using the changeset viewer.