• Tom Lane's avatar
    Further adjust degree-based trig functions for more portability. · 65abaab5
    Tom Lane authored
    The last round didn't do it.  Per Noah Misch, the problem on at least
    some machines is that the compiler pre-evaluates trig functions having
    constant arguments using code slightly different from what will be used
    at runtime.  Therefore, we must prevent the compiler from seeing constant
    arguments to any of the libm trig functions used in this code.
    
    The method used here might still fail if init_degree_constants() gets
    inlined into the call sites.  That probably won't happen given the large
    number of call sites; but if it does, we could probably fix it by making
    init_degree_constants() non-static.  I'll avoid that till proven
    necessary, though.
    65abaab5
float.c 74.5 KB