compile detection of powf, etc



Is there a standard way using the preprocessor to detect if a given C
compiler/library environment provides the C99 <math.h> floating point
functions such as:

float powf(float x, float y);
float sqrtf(float x);
etc

so we could "provide" these prototypes or not via our

"xtra_math.h" file

Note some C environments are incomplete and may define the C90 flag but
still provide these functions. So I think we need to check each
function.

looking for any suggestions

thanks

.



Relevant Pages

  • Re: weird problem
    ... I already told you that the comparison between an integer and a float ... And now a question about something else: why do you use floating ... use then to copy a float into a char *1. ... binary representation doesn't resemble a string like "123.46343" ...
    (comp.lang.c)
  • Re: Safer of 2 methods for very long doc
    ... I use wrapped objects so seldom that I have to think about how I've handled that when I have used them, and I guess, as you say, I've moved the anchor. ... paragraph and the picture move to the next page. ... in Word the text does not flow from after a 'floating' ... >I'd appreciate knowing how you "float" a table, ...
    (microsoft.public.word.docmanagement)
  • Re: float vs. double?
    ... There have been repeated myths that float is faster than double. ... In antique machines, the ... Note that the floating-point ALU of Intel chips supports an 80-bit floating point number, ... is different precision being stored? ...
    (microsoft.public.vc.mfc)
  • Re: Rounding of the double
    ... I still think you can do what you want using DWORDs and just assume the decimal position rather than using floats of doubles. ... I think you're going to have the same problem in any language as the floating point technology is not specific to C++ or unmanaged C++. ... /* Round a double or float to 'sig' places to the left or right of the decimal. ... As Joe says "there is no accurate representation of 0.80 in IEEE floating ...
    (microsoft.public.vc.mfc)
  • Re: converting float to double
    ... necessarily the one preferred for financial transactions. ... What he has is a float that approximates the desired value. ... I'd say eschew floating point except where necessary ... cents = lrint ...
    (comp.lang.c)