Ignore:
Timestamp:
Nov 2, 2012, 11:45:02 AM (8 years ago)
Author:
sam
Message:

math: reimplement min(), max(), abs() and fmod() in the lol:: namespace to
avoid conflicts with the C++ stdlib.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/math/poly.cpp

    r1893 r2056  
    124124        union { float f; uint32_t x; } s1 = { sinf(adjustf(u.f, 0)) };
    125125        union { float f; uint32_t x; } s2 = { floatsin(adjustf(u.f, 0)) };
    126         int e = abs((int)(s1.x - s2.x));
     126        int e = lol::abs((int)(s1.x - s2.x));
    127127        switch (e)
    128128        {
     
    133133printf("sinf: ");
    134134inspect(sinf(u.f));
    135             if (fabs((double)s1.f - (double)s2.f) > 1e-10 * fabs(s1.f))
     135            if (lol::abs((double)s1.f - (double)s2.f) > 1e-10 * lol::abs(s1.f))
    136136                printf("%15.13g %08x: %15.13g %15.13g %08x %08x\n", u.f, u.x, s1.f, s2.f, s1.x, s2.x);
    137137        case 0:
Note: See TracChangeset for help on using the changeset viewer.