There are many possibilities here. Here's a few.
In the function version, the argument is explicitly typed as a float. This means that if you call
f(1);
then 1 is converted to the float 1.0f as the argument. Then, when 1 / (1 + x * x) is computed, it evaluates to 1 / 2.0f, which comes out to 0.5f. However, in the macro version, f(1) would be evaluated as 1 / 2 using integer division, yielding the value 0.
Second, in the function version, the argument is evaluated only once. This means that
int x = 0;
f(x++);
will increment x to 1, then pass in the value 0. The result will then be 1.0f. In the macro version, however, the code expands to
1 / (1 + x++ * x++)
This causes has undefined behavior because there is no sequence point between the evaluations of x++. This expression could evaluate to anything, or it could crash the program outright.
Finally, the function version respects operator precedence while the macro does not. For example, in the function version, calling
f(1 - 1)
will call f(0), evaluating to 1.0f. In the macro version, this expands to
1 / (1 + 1 - 1 * 1 - 1)
= 1 / (1 + 1 - 1 - 1)
= 1 / 0
This causes undefined behavior because of a divide-by-zero error.
The simple way to avoid this is to not use macros to define functions. Way back in the Bad Old Days this was a standard practice, but now that C has inline functions and compilers are way smarter, you should prefer functions to macros. They're safer, easier to use, and harder to mess up. They're also type aware and don't evaluate arguments multiple times.
Hope this helps!
xexcept 0. The second will also perform side effects twice, and may have errors from text replacement.